RFR: JDK-8217723 Switch ld from bfd to gold on gcc toolchain
Andrew Haley
aph at redhat.com
Fri Jan 25 14:39:17 UTC 2019
Massive win for gold here, on my (very old) AArch64 system:
BFD linker:
$ time /home/aph/gcc-x/aarch64-trunk-install/bin/g++ -Wl,-z,defs -fuse-ld=bfd -Wl,-z,noexecstack ...
real 0m26.090s
user 0m24.570s
sys 0m1.480s
gold, single-threaded:
$ time /home/aph/gcc-x/aarch64-trunk-install/bin/g++ -Wl,-z,defs -fuse-ld=gold -Wl,-z,noexecstack ...
real 0m12.325s
user 0m12.030s
sys 0m0.280s
gold, multi-threaded:
$ time /home/aph/gcc-x/aarch64-trunk-install/bin/g++ -Wl,-z,defs -fuse-ld=gold -Wl,--threads -Wl,-z,noexecstack ...
real 0m8.297s
user 0m14.680s
sys 0m1.650s
I would very much like to see this change go in, with a probe to make
sure that -fuse-ld=gold works. There is unfortunately one gotcha: on
some systems gold is built without threading support (why,
fercrineoutloud?) so it's necessary to probe for -Wl,--threads
separately.
--
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the build-dev
mailing list