From d164db4baff882e53a51bc5f59a865cfa25b04ea Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Mon, 2 Aug 2021 12:38:14 +0200 Subject: [PATCH] disable -Werror in hotspot 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 | 13 +++++++++++++ openjdk8.spec | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 hotspot-disable-werror.patch diff --git a/hotspot-disable-werror.patch b/hotspot-disable-werror.patch new file mode 100644 index 0000000..bd79aa1 --- /dev/null +++ b/hotspot-disable-werror.patch @@ -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 diff --git a/openjdk8.spec b/openjdk8.spec index 179aaf7..13f6170 100644 --- a/openjdk8.spec +++ b/openjdk8.spec @@ -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. -- 2.43.0