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: gold: how to integrate into existing tool chain


Roland Baumann <roland.baumann@CoWare.com> writes:

> 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).

The -B option to g++ gives it an additional directory in which to find
compiler passes.  If you put gold in a directory under the name
"real-ld" and then pass -Bdirectory_name/ (older versions of gcc
require the trailing slash), then gcc should use tell collect2 to use
gold.  You can use -Wl,-debug to confirm.

Ian


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