gold for linking

Erik Joelsson erik.joelsson at
Mon Mar 27 08:28:19 UTC 2017

I have experimented with this too, but never got around to introducing 
the option because our internal devkits were built without gold support. 
I have been meaning to include gold support in the next compiler upgrade 
(in JDK 10) and at that point, either suggest gold by default or at 
least introduce the option. We could certainly add a configure parameter 
before that though.


On 2017-03-26 14:43, Claes Redestad wrote:
> +1, at least to make it an optional setting.
> Making it heavily multi-threaded by default may be a pessimization when
> we're doing full image builds, cf. how many of the java tools in the
> build is using serial GC and fewer compiler threads to play nice under
> heavy parallelism.
> Have you done any assessment on whether this has any effect on static
> footprint and performance on the resulting images?
> /Claes
> On 2017-03-26 12:30, Ioi Lam wrote:
>> I just tried adding -fuse-ld=gold to the g++ linker flags, and my
>> link time shrinks from 18 seconds to 6 seconds. And that's
>> with single threaded linking. If I add "-Wl,--threads
>> -Wl,--thread-count,8" it becomes 4 seconds. It doesn't seem to scale
>> after 8 threads.
>> Any plans for adding official (perhaps optional) support for gold in the
>> JDK build system?
>> Thanks
>> - Ioi

More information about the build-dev mailing list