forcing the linker to be a particular one (i.e. gold vs bfd)

Matthias Klose doko@ubuntu.com
Wed Jan 19 20:39:00 GMT 2011


On 19.01.2011 19:06, Nick Clifton wrote:
> Hi Vladimir,
>
> I am sorry but I am out of touch with this topic. It seems to me that there are
> two solutions:
>
> 1. Use gcc's -B command line switch to select a directory containing the desired
> linker, or more probably the desired collect2 or exec-tool script.
>
> 2. Add a new GCC command line switch to allow the user to select a linker by
> name and then provide a mechanism for locating it.
>
> Option 1 is easy and requires no changes, but as Matthias already pointed out,
> it only works if the user (or build mechanism) already knows where the linker(s)
> have been installed.
>
> If I remember correctly my original patch implemented option 2 by adding some
> more logic to gcc/exec-tool.in. I still think that this is the easiest solution.
> It should mean no other changes to gcc or the binutils and it makes use of a
> linker wrapper mechanism that is already in place.

here is the patch originally written by Nick, and updated to the current trunk; 
lto test cases still don't work.  I think I'm getting the linker selection wrong 
for these cases.

   Matthias
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gold-and-ld.diff
URL: <https://sourceware.org/pipermail/binutils/attachments/20110119/3ee19b62/attachment.ksh>


More information about the Binutils mailing list