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: PATCH: Support --enable-gold=both --with-linker=[bfd|gold]


> 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?

This setup is compatible with using "alternatives" to switch a $(bindir)/ld
symlink.  Using "alternatives" is outside the scope of what 'make install'
should do, so having it install a plain symlink makes sense.  Packagers
will drop the ld symlink and do their own thing.  (This is exactly what we
are doing now in Fedora >= 13.)

Another obvious approach is to add a wrapper script for $(bindir)/ld that
groks an argument like --gold or --bfd to choose which real ld to run.
That could be used by hand and by gcc -Wl,--gold, etc.  That is also fine
by me.  But it requires inventing some new plan for where the system-wide
default is configured.  IMHO it seems better just to leave that sort of
thing to packagers.


Thanks,
Roland


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