building OpenJDK 11 with link time optimizations?

Matthias Klose doko at ubuntu.com
Tue Jan 26 16:08:56 UTC 2021


Several Linux distros now build with link time optimizations (-flto=auto) by
default.  It looks like 15 and newer versions can be built with -flto. I haven't
yet checked test results for LTO/non-LTO builds. I also only tried building with
GCC 10.

11 still fails with
/usr/bin/ld: /tmp/libjvm.so.xGmnnW.ltrans45.ltrans.o: in function
`G1CMOopClosure::do_oop(oopDesc**)':
/<<BUILDDIR>>/openjdk-lts-11.0.9.1+1/make/hotspot/./src/hotspot/share/gc/g1/g1OopClosures.hpp:176:
undefined reference to `void G1CMOopClosure::do_oop_work<oopDesc*>(oopDesc**)'
[...]

However this might be just the first build failure.

Matthias


More information about the jdk-updates-dev mailing list