jdk8u: -Wno-regsiter to support newer compilers
Elazar Leibovich
elazarl at gmail.com
Fri Jul 19 14:20:31 UTC 2024
When trying to compile the latest jdk8u on linux I get failures over
warnings with the register keywords.
I'm using https://github.com/openjdk/jdk8u-dev.git which seems to be pretty
up to date (I'm using master), and last commit is less than two days ago.
This is a workaround I had to use:
diff --git a/hotspot/make/linux/makefiles/gcc.make
b/hotspot/make/linux/makefiles/gcc.make
index 7dde7f0963..81f156574a 100644
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -202,7 +202,7 @@ else
endif
# Compiler warnings are treated as errors
-WARNINGS_ARE_ERRORS = -Werror
+WARNINGS_ARE_ERRORS = -Werror -Wno-register
But I guess the best solution is to remove the register keywords from the
codebase.
How is adoptium building it? Does it use specific compiler? Is the
supported compiler documented anywhere?
FTR using temurin-build repository and scripts, fails for other reasons,
and fails even with -D/--podman docker containers.
This patch builds it with centos stream 9 on amd64.
Am I doing something wrong? What's the recommended way of building jdk8?
Thanks,
Elazar Leibovich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20240719/89802950/attachment.htm>
More information about the build-dev
mailing list