This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] --enable-gold=both
- From: Ian Lance Taylor <iant at google dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 15 Oct 2009 23:08:37 -0700
- Subject: Re: [PATCH] --enable-gold=both
- References: <20091016003514.9B0AB1638@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> writes:
> This lets you configure with --enable-gold=both to build both ld and gold.
> It installs them as "ld.bfd" and "ld.gold" respectively, making "ld" a
> symlink to ld.bfd. This is a good fit for e.g. packaging for systems using
> the "alternatives" mechanism to switch /usr/bin/ld between the two at will.
Perhaps we should build ld even with --enable-gold=yes, but symlink ld
to ld.gold. Perhaps we should install only gold if we use
--enable-gold=only, or something like that.
One issue with the approach you propose is that there is no simple way
to have gcc invoke ld. What we do internally here is install GNU ld
in a directory named compat-ld. It then becomes possible to use gcc
with the option -B .../compat-ld/ in order to use the GNU linker
instead of gold. In order to make that work, the binaries have to
have the name "ld" or "real-ld", without the suffixes.
Anybody else have a different approach to suggest?
Ian