RFR: [8u] 8141570: Fix Zero interpreter build for --disable-precompiled-headers
Andrew John Hughes
gnu.andrew at redhat.com
Wed Aug 21 19:33:32 UTC 2019
This is the first of a series of four changes to support -Wreturn-type
in OpenJDK 8u. The -Wreturn-type warning catches instances where control
flow exits a non-void function without returning a value. This can
combine with compiler optimisations in some cases to cause runtime
crashes. The warning is turned on by default in GCC 8 [0], causing the
build to fail if it is not explicitly disabled.
The subsequent changes are JDK-8062808 to apply the warning and fix
issues in the default build, JDK-8143245 to fix issues in the Zero build
and JDK-8197981 to fix one remaining Zero issue on 32-bit platforms only.
This change ensures the Zero build is not broken by 8062808 by disabling
-Wreturn-type in the Zero makefile.
Changes in the backport process:
* The G1 changes are dropped as 8u does not contain JDK-8073013, which
introduces g1EvacStats.*
* I've changed the ifeq ($(USE_CLANG), true) to ifeq
($(JVM_VARIANT_ZEROSHARK), true). There seems to have been a mistake in
the original patch which equated LLVM with clang. What is actually
referred to by "some version of llvm do not like -Wundef" is the LLVM
headers that Shark is built against, not the clang compiler which also
uses LLVM. This made its way through to the new HotSpot build in OpenJDK
9 & 10, but is gone as of JDK-8198724 in OpenJDK 11 and later.
This backport has been in IcedTea since 3.8.0 (2018-05-29) [1] and our
RHEL RPMs since 2018-06-16 without issue. Builds of current 8u-dev on
x86_64 with Zero release and Zero slowdebug succeeded.
[0] https://gcc.gnu.org/gcc-8/changes.html
[1] https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3548
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list