Breakage with bleeding edge host toolchains (Fedora)

Dan Nicholson dbn.lists at
Tue Feb 27 12:08:06 PST 2007

An oldie but a goodie, I thought I'd open up the discussion of
breakage when using a very new host toolchain. Someone hit this issue
again with FC6 on lfs-support:

The issue is basically that the Fedora gcc specs are hardwired to
always pass --hash-style=gnu to ld during linking. You may recall that
the same issue cropped up with --as-needed a year or two ago. This is
a problem because as soon as we build our new ld in binutils-pass1,
it's preferred by gcc, but can't handle the supplied options.

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. The
new gcc will only contain options in the spec that the binutils-pass1
ld can use from the configure feature tests. Here's Greg's post and
what's currently in DIY:

He's added some conditionals so that the -B arg isn't added to CC
unless it needs to be. I think we could probably just force in the -B
and leave the tweak for the experts. He also points out that this
excludes gcc-2.95.3 since it can throw some output in the presence of
-B that ruins some crappy configure tests. So, that'd make a host
requirement of gcc-3.0.1.

What do you guys think?


More information about the lfs-dev mailing list