On 8/23/2012 9:13 AM, ??? wrote:
Hi,
I am very confused about tool chain technique, especially when
digesting more details. In LFS-7.1 chapter 5 (constructing a temporary
system) the book says "Binutils is installed first because the
*configure *runs of both GCC and Glibc perform various feature tests
on the assembler and linker to determine which software features to
enable or disable.". But after "Binutils-2.22 - Pass 1" the binutils
(ld/as etc) are the host's. Or you can say that after binutils pass 1,
if compiling dummy.c, gcc still uses the host's binutils, not those
installed by binutils -- pass 1. On the other hand, when configuring
and compiling gcc-4.6.2-pass 2, the following print will come out:
checking for ar... /tools/i686-lfs-linux-gnu/bin/ar
checking for as... /tools/i686-lfs-linux-gnu/bin/as
So I guess that when binutils/gcc/glibc know they are cross-compiling,
they will use the cross tools already installed instead if existing.
Am I right? Or is there some tool chain mechanism, which is very
complicated?
----Hadi
The code doesn't necessarily know it's cross-compiling, it's reading the
environment variables that have been set, after the shell has
interpreted the command given. That's why the /tools folder is set in
the PATH as the first place to check for the tools, then host folders
are searched. Hashing is also turned off to ensure that the newly built
tools are the tools being used once they exist. Though I'm sure that
Bruce can explain even better... :)
Elly
--
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page