ld built without --hash-style, Ch5, Fedora Core 6 -> glibc config failure

Greg Schafer gschafer at zip.com.au
Sun Nov 26 13:43:30 PST 2006

Amadeus wrote:
>> Greg Schafer wrote:
>>> Try starting from scratch, this time compiling Binutils-Pass1 like this:
>>> CC="gcc -B/usr/bin/" \
>>>   ../binutils-2.17/configure --prefix=/tools --disable-nls
>>> and similar for GCC-Pass1.
>> Thanks! That worked a treat (specifying CC="gcc -B/usr/bin" \ for 
>> binutils and gcc pass 1).
> Hmm, maybe I spoke too soon.
> After following the instructions up until DejaGNU, running `make check` 
> reveals:
> /tools/bin/ld: unrecognized option '--hash-style=gnu'
> /tools/bin/ld: use the --help option for usage information
> collect2: ld returned 1 exit status
> make[4]: *** [unit] Error 1
> make[4]: Leaving directory 
> `/home/lfs/sources/dejagnu-1.4.4/testsuite/libdejagnu'
> ...

So, the toolchain is somehow passing --hash-style=gnu to your ld in
/tools/bin which of course doesn't understand it. Hmmmm..

> Checking config.log for DejaGNU:
> configure:1742: checking for gcc
> configure:1758: found /tools/bin/gcc

This is the correct gcc. Good.

> [lfs at poff dejagnu-1.4.4]$ /tools/bin/gcc -dumpspecs


No mention of --hash-style=gnu. Good.

> And the FC6 specs:
> [lfs at poff dejagnu-1.4.4]$ /usr/bin/gcc -dumpspecs


> *link:
> %{!static:--eh-frame-hdr} -m %(link_emulation) --hash-style=gnu 

And there's the reference to --hash-style=gnu in the *host* toolchain. But
this is to be expected.

So, the mystery is why your new gcc is still trying to pass
--hash-style=gnu to your new ld.

The only thing I can think of is that something went wrong during the
toolchain adjustment and your specs edit somehow used the specs from the
host. Please show the output of:

type gcc
echo 'main(){}' | gcc -xc -v -


More information about the lfs-support mailing list