Hello All, I am a mostly happy user of the GOLD binutils linker (thanks Ian!) and it is the default /usr/bin/ld on my Debian/Testing system.
However, in some occasions, it could be useful to use another linker (ie the plain BFD one). For example, polyml requires that (see my http://lists.inf.ed.ac.uk/mailman/private/polyml/2010-October/000795.html which is in a hidden archive, acessible to polyml@ subscribers only), because it has specific tricks and gets libtool: link: gcc-4.5 -Wall -fno-strict-aliasing -O3 -o .libs/poly polyexport.o libpolymain/.libs/libpolymain.a libpolyml/.libs/libpolyml.so -lpthread /usr/lib/libgmp.so -lm -ldl /usr/local/lib/../lib64/libstdc++.so -lgcc_s -lgcc -Wl,-rpath -Wl,/usr/local/lib/../lib64 /usr/bin/ld: error: polyexport.o: unsupported REL reloc section /usr/bin/ld: internal error in relocate_section, at ../../gold/x86_64.cc:2444 collect2: ld returned 1 exit status 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. Wouldn't it be sensible to provide a gcc switch to force a particular ld to be used? Something like CC='gcc -fforce-ld=/usr/bin/ld.bfd' ? Or, if there is some other way (excluding dirty PATH manipuation), document it better perhaps in http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#Link-Options Regards. -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mine, sont seulement les miennes} ***