This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Making binutils 2.19 for multiple platforms


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]