Review of --enable-gold=both patch

Matthias Klose doko@ubuntu.com
Thu Nov 11 00:09:00 GMT 2010


On 29.10.2010 17:12, Paolo Bonzini wrote:
> On 10/29/2010 04:54 PM, Matthias Klose wrote:
>> On 29.10.2010 11:20, Nick Clifton wrote:
>>> Hi Matthias,
>>>
>>>>> OK. I suppose we could also have --with-default-linker=gold -- or
>>>>> --enable :-) -- but I'm not worried about that.
>>>>>
>>>>> Thanks again for your help with this.
>>>>
>>>> the --enable-gold=both option is already in current binutils trunk,
>>>> which will soon be released as binutils-2.21. Should this be changed
>>>> before the binutils release, or should the binutils patch be kept as it
>>>> is? Any recommendations how to update the patch and/or current binutils?
>>>
>>> We should really make the 2.21 release support --with-default-linker=
>>> Would you care to submit a patch for this ?
>>
>> to summarize:
>>
>> - in binutils, --with-default-linker= should trigger which linker is
>> built, and should determine which linker the ld symlink points to.
>>
>> - if both linkers are built, the non-default linker build has to be
>> enabled with either --enable-ld or --enable-gold.
>>
>> - values (other than yes or no) passed to --enable-ld and --enable-gold
>> are ignored.
>
> Uh, actually no. Rereading the thread, the only point on which we had consensus
> :) was to remove the current wart of --enable-gold disabling --enable-ld; you're
> proposing to double it instead.
>
> This was my proposal:
>
> --disable-gold [--enable-ld]
> Build only ld. Default option.
>
> --enable-gold[=default] [--enable-ld]
> Build both gold and ld. Install gold as "gold" and "ld", install ld
> as "ld.bfd". This is different from the current behavior, in that ld
> is currently not installed at all.
>
> --enable-gold[=default] --disable-ld
> Build only gold, which is then installed as both "gold" and "ld".
>
> --enable-gold --enable-ld=default
> Build both gold (installed as "gold") and ld (installed as "ld").
> In other words, ld is default
>
> --enable-gold=default --enable-ld=default
> Error.

The attached patch implements this proposal, tested the combinations above, and 
disabling ld without gold (leading to an error).

I did choose to always install the bfd linker as ld.bfd and the gold linker as 
ld.gold, and pointing the link to one of the above.

Nick, is this ok with you?

   Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold.diff
Type: text/x-diff
Size: 4721 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20101111/33135eb9/attachment.bin>


More information about the Binutils mailing list