PATCH: Support --enable-gold=both --with-linker=[bfd|gold]

Matthias Klose doko@ubuntu.com
Tue Jan 5 23:52:00 GMT 2010


On 05.01.2010 23:59, Roland McGrath wrote:
 >> I'm still not entirely convinced that this is the way to go.  It seems
 >> to me that ideally one wants to be able to select the linker at
 >> runtime.  I don't see how this patch supports that.  What am I
 >> missing?
 >
 > It covers the first step by letting you run "ld.bfd" or "ld.gold" to
 > choose.  Having the two binaries installed by those names is a good start
 > and seems likely to be part of how any fancier plan would work, so why not
 > start there?

agreed on this.

>> Mainly because an alternative is to install them in subdirectories
>> with the name ld.  Then gcc can run them directly using a -B option.
>> I don't know which approach is best.
>
> I think it keeps things simplest for humans to understand if the actual
> binaries are available as ld.bfd and ld.gold.  If you then want some
> obscure directory names containing an "ld" for gcc's use, then make those
> symlinks.  Personally, I think -Wl,--gold (via $(bindir)/ld being a wrapper
> script) is nicer than -B/usr/libexec/binutils/gold/ or whatnot.

why not make this more explicit by adding an option --ld<ld> which is directly 
understood by the gcc driver?

   Matthias



More information about the Binutils mailing list