gold: how to integrate into existing tool chain

Roland Baumann roland.baumann@CoWare.com
Mon Apr 7 14:59:00 GMT 2008


Hi,

I tried out the new linker and for one of our tools it speeds up link 
times from 7 s to 1.6 s. Great job!

Now we are trying to figure out how to integrate gold into our existing 
development environment. We are still using gcc 3.4.4 and gcc 3.2.3 and 
need a way to optionally use gold instead of the normal ld when linking 
with a g++ command line.

I saw that collect2 looks for real-ld when it wants to call ld. So we 
could create a symbolic link to gold under that name in the search path 
and collect2 would use that. But then g++ would always use gold and we 
do not want that.

Instead it would be great to have a way to tell collect2 or g++ which 
linker to use (environment variable; command line option).

Any ideas?

Thanks a lot,
Roland



More information about the Binutils mailing list