disable -Werror in hotspot
authorJan Palus <atler@pld-linux.org>
Mon, 2 Aug 2021 10:38:14 +0000 (12:38 +0200)
committerJan Palus <atler@pld-linux.org>
Mon, 2 Aug 2021 10:38:14 +0000 (12:38 +0200)
triggers bogus nonnull warnings treated as errors. noticed already by
icedtea (infra down):

http://openjdk.5641.n7.nabble.com/Bug-3838-New-IcedTea8-Bogus-Wnonnull-warning-on-Zero-builds-td463114.html

possibly caused by gcc 11 regression:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96003

hotspot-disable-werror.patch [new file with mode: 0644]
openjdk8.spec

diff --git a/hotspot-disable-werror.patch b/hotspot-disable-werror.patch
new file mode 100644 (file)
index 0000000..bd79aa1
--- /dev/null
@@ -0,0 +1,13 @@
+# DP: Turn off -Werror for hotspot, overwrites -fpermissive.
+
+--- 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 = 
+ ifeq ($(USE_CLANG), true)
+   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
index 179aaf7abb17a5dd361cdba771b7ac9a8542ab4a..13f617065fd86da9ded7f50541fa3fcbee4e3ef0 100644 (file)
@@ -56,6 +56,7 @@ Patch9:               gcc11.patch
 Patch10:       link-with-as-needed.patch
 Patch11:       aarch32.patch
 Patch12:       atomic.patch
+Patch13:       hotspot-disable-werror.patch
 URL:           http://openjdk.java.net/
 BuildRequires: /usr/bin/jar
 BuildRequires: alsa-lib-devel
@@ -451,6 +452,7 @@ done
 %patch11 -p1
 %patch12 -p1
 %endif
+%patch13 -p1
 
 %build
 # Make sure we have /proc mounted - otherwise idlc will fail later.
This page took 0.13923 seconds and 4 git commands to generate.