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: forcing the linker to be a particular one (i.e. gold vs bfd)


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

Attachment: gold-and-ld.diff
Description: Text document


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