gcc/g++ compiler in LFS

Ken Moffat ken at linuxfromscratch.org
Thu Nov 11 07:07:59 PST 2010

On Thu, Nov 11, 2010 at 09:32:24AM -0500, Anand Arumugam wrote:
> I was of the impression that there should be no reference to '*
> i686-pc-linux-gnu*'. The config.guess script which I ran to find out the
> guessed name returned '*i686-lfs-linux-gnu*'. Both these folders have the
> same contents.
 The -lfs-linux-gnu programs are created in the cross-compile parts
of chapter 5, i.e. binutils pass 1 and gcc pass 1.  When we build
the pass 2 versions, they have the normal names (i686-pc-linux-gnu
in your case, x86_64-unknown-linux-gnu in mine).

> Does this mean I have to redo everything from "Adjusting the tool chain"
> step?

 No.  The i686-*-linux-gnu- programs are hard linked to the programs
in /tools/bin (and similarly in chapter 6 to the programs in
/usr/bin).  So, in the early parts of chapter 5 gcc and ld will be
hardlinked to the -lfs- versions, and after the pass 2 versions have
been installed they are linked to the -pc- versions.  You can prove
that with 'ls -i'.

 The only reason to redo everything would be if the programs in
/tools/bin were linked to host libraries in /usr/lib instead of the
libraries in /tools/lib.

das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list