binutils pass 1, CC="gcc -B/usr/bin/"
tomas.klacko at gmail.com
Thu Apr 2 16:34:34 PDT 2009
On Thu, Apr 2, 2009 at 12:21 PM, Jack Stone <jwjstone at fastmail.fm> wrote:
> Tomas Klacko wrote:
>> Ok, I get it now. The ld is compiled again, the second time
>> with the LIB_PATH set to /tools/lib.
>> But still, maybe I can afford not to set the CC to "gcc -B/usr/bin/",
>> and just use the --with-lib-path configure option instead?:
>> ../binutils-2.18/configure --prefix=/tools --disable-nls \
>> --disable-werror --with-lib-path=/tools/lib
>> make install
> This wouldn't work.
I went on (curious) to compile gcc pass 1 and yes, it did not work.
The configure script in the (gcc) intl directory fails (complains
that "the compiler can not create executables").
I think I will go and investigate the details later,
following the LFS book instructions works for me so far.
> 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.
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?
> We then recompile just ld with lib-path as
> /tools/lib and install this as ld-new. This does need -B so that
> the hosts gcc uses the correct set of binutils.
(Curious) can this be postponed until the adjusting phase?
> I guess that the set of commands you posted would work for the
> second compile with two changes: add the CC to use the hosts binutils
> and use a cp instead of the make install as we only want to install
> ld. You would also probably need a clean source/build tree just in case.
> However, this would obviously recompile more that we need.
I get this one.
> The above explanation is a bit dense. Feel free to ask for clarification.
More information about the lfs-support