LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-28-2014, 06:36 AM   #1
Roy_SRC
Member
 
Registered: Jul 2014
Posts: 81

Rep: Reputation: Disabled
confusion in LFS 7.5 - 6.10. Adjusting the Toolchain


hey there i managed to get to chapter 6.10. Adjusting the Toolchain of the LFS 7.5 book but i ran into a confusion... which is.. should i execute the following codes from root#/sources$ or just root#$

Code:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
Code:
gcc -dumpspecs | sed -e 's@/tools@@g'                   \
    -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
    -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' >      \
    `dirname $(gcc --print-libgcc-file-name)`/specs
and the sanity check..

Code:
echo 'main(){}' > dummy.c
cc dummy.c -v -Wl,--verbose &> dummy.log
readelf -l a.out | grep ': /lib'
and what about the rest of the codes in chapter 6.10.. thanks..
 
Old 07-28-2014, 08:05 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Not sure what you mean with the root#. It's been awhile since I did a LFS build, but IIRC, you're already in the chroot environment in chapter 6.10. Within the chroot environment, the filesystem root (/) is /mnt/lfs (or whatever you have $LFS set to) from your host system. So, /tools/bin in your chroot environment is the same as /mnt/lfs/tools/bin in your host system.

Since the commands in 6.10 use absolute paths, not relative paths, it doesn't matter where you execute the commands from. Unless the instructions direct me to change directories, I stay in /sources. So, I would execute those commands from /sources (/mnt/lfs/sources from the host system perspective). But, you can execute them from whichever directory in your chroot that tickles your fancy.

The remaining commands in 6.10 are grepping the log file you create in the last step you post above. So the remaining commands need to be executed from the directory in which you created dummy.log.
 
1 members found this post helpful.
Old 07-29-2014, 03:54 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Chapter 6.6 is where you entered chroot environment, also there are additional instructions of how to return to chroot environment if you should have to leave at the bottom of that page. Make sure that you follow the additional minstructions to get back to the chroot environment or you will endup changing your $PATH in your host sytem. Beleive my I've done it.
 
Old 01-14-2015, 09:57 AM   #4
ravichanderjha
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Rep: Reputation: Disabled
I have been following LFS nowadays and i have reached to chapter 6.10 Adjusting the Toolchain. I have followed the given commands but i am failed in sanity check of:-

grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log

I haven't get expected result i.e :-
/usr/lib/crt1.o succeeded
/usr/lib/crti.o succeeded
/usr/lib/crtn.o succeeded

So , i am facing trouble in next chapters .Please let me know the solution to get rid of this trouble.
 
Old 01-14-2015, 10:36 AM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Did you deviate from the book any?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LFS 7.1 / 6.10. Re-adjusting the Toolchain question Jilted_ Linux From Scratch 2 09-08-2018 04:30 PM
[SOLVED] LFS 7.1 Adjusting the Toolchain - some precisions E-Kami Linux From Scratch 12 07-29-2012 08:19 PM
LFS- Adjusting the Toolchain problem LinuxNewman Linux From Scratch 27 06-09-2009 02:04 AM
5.7. Adjusting the Toolchain LFS.6.3 need help foi Linux From Scratch 3 07-05-2008 07:30 PM
Adjusting the Toolchain in lfs 6.3 saritha Linux From Scratch 3 02-15-2008 01:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration