Breakage with bleeding edge host toolchains (Fedora)
bryan at kadzban.is-a-geek.net
Tue Feb 27 15:48:25 PST 2007
Dan Nicholson wrote:
> Greg came up with a pretty good solution for DIY (IMO). Basically, by
> passing CC="gcc -B/usr/bin/" during binutils-pass1 and gcc-pass1,
> gcc will continue to use the host linker until we get our gcc built.
Why not set our new linker to not be executable (that is, chmod a-x)
until pass1 gcc is built? That way we don't accidentally affect
The gcc specs file hardcodes a linker name of "collect2", but collect2
is a program from gcc itself. It runs a bunch of code, and at some
point finally executes DEFAULT_LINKER if that was set during gcc's
configure script (--with-ld). If DEFAULT_LINKER isn't set, then it
searches the $PATH for an executable program named "ld".
So if our ld in /tools/bin isn't executable, it shouldn't find it.
Or how about $COMPILER_PATH? If we set that to have /usr/bin listed
before /tools/bin, that might also work. This will affect more than
just ld -- it will affect ld, (g)as, and any other subprogram run by
gcc. But OTOH, each of these programs may have the same issue in the
(Note that I haven't tested either of these, but I have read through
some of the gcc 4.1.1 sources for collect2, and some of the gcc info
docs. So maybe this is all useless, I don't know. ;-))
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: OpenPGP digital signature
More information about the lfs-dev