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 10/11/2010 12:17 AM, Matthias Klose wrote:
On 10.10.2010 22:02, Kalle Olavi Niemitalo wrote:
Basile Starynkevitch<basile@starynkevitch.net> writes:

Of course, one can always force ld to be a particular linker (i.e. the
BFD one on a system where the default is GOLD, or vice versa) with ugly
$PATH and symlink tricks. But that is ugly.

You mentioned you use Debian; their gcc-4.4 4.4.3-4 and later have a "gold-and-ld" patch to support gcc -fuse-ld=bfd and -fuse-ld=gold. This patch is not in the FSF's GCC 4.4.5, 4.5.1, nor trunk.

sorry to say so, but that's a bad story. this is a patch which is in current binutils trunk, submitted for review for gcc trunk, finally got reviewed by Mark Mitchell after some months, but didn't get any feedback from the original submitter. With binutils 2.21 getting close to release, we'll have a mismatch with gcc and binutils. any idea how to make some progress?

Matthias




Hi Ian and Nick,


Nick, can you shed any light on your patch status?

TBD, here is the link on Debian's svn
http://svn.debian.org/viewsvn/gcccvs/branches/sid/gcc-4.4/debian/patches/gold-and-ld.diff?view=log&pathrev=4512

1. Are you going to push it into gcc trunk/4.5.x/4.4.x?

2. Looks like the patch is a bit outdated, with binutils-2.21 release ld/gold
placement/naming is defined and IMO the line
+  static const char *const gold_suffix       = "gold";
should be
+  static const char *const gold_suffix       = "ld.gold";


Also I have several questions for both of you (Further I suggest that gcc is being built against binutils-2.21): 3. What for do we need --enable-gold in configure.ac and gcc_cv_gold/ORIGINAL_GOLD_FOR_TARGET,etc. in gcc/configure.ac, gcc/exec-tool.in? For "Single tree build"? Is this mode used widely? As I understand the most of people use separate binutils/gcc build. In separate build default linker is specified via binutils configure options. So we need not explicit gold support in gcc's configure process. Is "Single tree build" mode support important for gold developers?

4. Why did you convert -fuse-ld=gold/ld into -use-gold/-use-ld before
call collect2? I'd suggest to pass the option as is. In collect2 - extract
ld-name from the option, search for specified file(may be adding exe_suffix
if necessary) and launch the linker if found.

5. Ones we need to pass some options to collect2, what do you think
about -Wc,OPTIONS_FOR_COLLECT2 interface into gcc? Like
it is for -Wa/-Wl. "c" in -Wc means collect, may be -Wt is better
to avoid confusion with "C" as language.

Best regards
Vladimir Simonov


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