Making binutils 2.19 for multiple platforms
Nick Clifton
nickc@redhat.com
Fri Jan 2 13:51:00 GMT 2009
Hi Marty,
> I've done "configure --enable-targets=xxxx" on binutils (on and off) for years.
> It works, but doesn't pick up libc by default (I have to add -L as needed)
> When I built it without --enable-targets, I had no problem.
This is because when you do not use --enable-targets the configuration
scripts can work out that you are building a native linker and set up
the library search paths correctly. When you use --enable-targets you
are effectively building a cross-linker, (even though one of the targets
matches your host system), and so the configuration scripts do not add
the native search paths to the generated linker scripts.
In general this is correct - there is no point in searching for
non-native target libraries in the normal native library directories.
You have a special case, where one of the cross targets actually matches
the host, but the configuration scripts are not set up to handle this.
The simplest solution to the problem is to have two linkers, one a
native linker (only) and one a cross-linker (only). I.e. do not try to
mix native and cross linkers.
Cheers
Nick
More information about the Binutils
mailing list