binutils pass 1, CC="gcc -B/usr/bin/"

Tomas Klacko tomas.klacko at
Sat Apr 4 13:01:54 PDT 2009

On Fri, Apr 3, 2009 at 8:51 PM, Jack Stone <jwjstone at> wrote:
> Tomas Klacko wrote:
>>> You need to compile everything with
>>> lib-path as /usr/lib etc so that we can compile gcc-pass1
>>> against these binutils, (if I understand correctly this part
>>> does not need -B).
>> Do you have any pointers on where to find out more about the lib-path?
>> My current knowledge is that it only sets up the linker (ld) search path.
> Thats my understanding as well. My only guess would be binutils/gcc docs.

I think that is the only use of the LIB_PATH,--with-lib-path.
I read about it in binutils-2.18/ld/README and also searched
the various configure scripts in the binutils-2.18 directory
(only ld/configure deals with the --with-lib-path option).

>> The gcc pass 1 is also configured with CC="gcc -B/usr/bin/",
>> and this gave me the impression that the gcc pass 1 was
>> actually not being built againts the binutils pass 1.
>> Does this have to do something with the fact that
>> the gcc is compiled (according to the LFS book) three-times?
> The -B /usr/bin tells the HOST compiler to use the HOST binutils.

Yes, and it is what confused me.

> I think the --prefix and --with-local-prefix tell the compiler where to
> find binutils as well as where to install but I'd need to check the gcc
> docs.

Well, yes and no. No because --prefix tells the configure script the path
where to install the package (the explanation of the --with-local-prefix
is in gcc-4.3.2/INSTALL/configure.html).

Yes because the new gcc compiles itself once it is compiled
by the host gcc. During my experiments, the gcc-build/intl/config.log
contained line:
-B/bfu-tools/i686-pc-linux-gnu/bin/ -g -O2 -fomit-frame-pointer
conftest.c  >&5
/bfu-tools/i686-pc-linux-gnu/bin/ld: cannot find -lc
This tells me that the value passed to the --prefix and --with-local-prefix
configure options is later passed to the -B option, when the new gcc
is compiling itself.

Tomas Klacko

More information about the lfs-support mailing list