RFA/RFC: Enable both gold and ld in a single toolchain
Nick Clifton
nickc@redhat.com
Tue Mar 9 10:09:00 GMT 2010
Hi Guys,
Thanks very much for the feedback on my original patch. Attached
below is a revised version in which I have tried to take into account
all of the suggestions that were made.
H.J. - I apologise for forgetting that you had already submitted a
patch that does basically the same thing as my patch. I have adopted
most of the ideas from your patch into this revised version, but with a
few changes:
* I named the BFD based linker "gld" rather than "ld.bfd". I thought
that this was more intuitive, and it also matches how the linker is
referred in various bits of documentation.
* I made the --enable-gold=both still have the original linker (gld)
as the default rather than gold. My reasoning here was that if a
toolchain builder wants to have both linkers then they are going to want
to compare them and they would expect to start with the already
established linker, rather than the new one. Configuring with
--enable-gold=both/gold will make gold the default linker.
Other changes in this version of the patch include:
* I have added a dependency to Makefile.def so that gold will be
installed before ld if both exist in the build tree.
* "test ... -o ..." has been replaced by "test ... || test ..." and
"test ... == ..." by "test ... = ...".
* I am still matching command line switches using regular
expressions, since I think that it is neater, but the testing should be
more efficient now and less prone to false positives.
* I have removed the x prefix when checking the original linker path.
* The output from the --version option now conforms to the GCD.
* I use "exit 1" as an error return rather than "exit -1".
Apart from that the patch is the same as before. I have retested it
with a full bootstrap and it still is OK.
So - (finger's crossed) - is the patch OK to apply ?
Cheers
Nick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold-and-ld.patch.2
Type: application/x-troff-man
Size: 43108 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100309/aa584bb9/attachment.2>
More information about the Gcc-patches
mailing list