[lfs-support] Dazed and Confused

Bruce Dubbs bruce.dubbs at gmail.com
Wed Aug 15 12:24:22 PDT 2012


Mikie wrote:
> Hello all,
>
> I am at 5.8 Adjusting the Tools chain.
>
> ... and I am really confused.
>
> Here is the command:
>
> SPECS=`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/specs
> $LFS_TGT-gcc -dumpspecs | sed \ -e 's@/lib\(64\)\?/ld@/tools&@g' \
 > -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
 > echo "New specs file is: $SPECS"
 > unset SPECS
>
>
> Now I am a beginner here but this looks like we construct an external
> SPECS file (the internal one is compiled with GCC ???? is that
> right??).
>
> Where is this file?
>
> When I run it I get New specs file is: $SPECS as if the $SPECS
> variable is null.

It is a rather complex construct.  When you need to check something like 
this, break it down:

dirname $($LFS_TGT-gcc -print-libgcc-file-name)

You are the user lfs and $LFS_TGT is defined, right?  It should be:

i686-lfs-linux-gnu for a 32-bit system and x86_64-lfs-linux-gnu for a 
64-bit system.

Then you can run '$LFS_TGT-gcc -dumpspecs' and see what it is giving. 
We are using sed to change a couple of directory paths to /tools so the 
right version of gcc is used.

   -- Bruce



More information about the lfs-support mailing list