This is the mail archive of the 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 01/12/2011 08:44 PM, H.J. Lu wrote:
On Wed, Jan 12, 2011 at 9:22 AM, Vladimir Simonov<> wrote:
2.2 Leave gcc untouched and do the same work in binutils.
If --enable-gold specified in binutils configure options we create
simple wrapper which will strip --use-ld=LINKER_NAME from linker
options and call appropriate linker. Default linker is defined
by configure options. The wrapper is installed as ld.
The wrapper code should be located in gold directory and built
(and installed as ld) if "make" visits gold directory.

Both have pro and contra. 2.2 - decreases binutils install size,
leaves gcc untouched but adds additional "exec" during link process.

I can try to do any.
What do you think which is better?

I don't think we should go with 2.2. GCC driver already sets

COLLECT_GCC_OPTIONS='-c' '-v' '-mtune=generic' '-march=x86-64'

Why not add


which can be set by "gcc|ld.bfd"?

IMO duality in linker implementation should be hidden from gcc as much as possible. Right now in plain gcc sources we already have: [gcc-4.5.2]$ grep -i -E "\<gold\>|_gold" * -r|wc -l 706

The more options we add to gcc the more problems
in gcc version switch(back and forward) appear for gcc users.

Anyway, consensus on this matter is desirable.

Vladimir Simonov

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