diff options
| author | Richard Leitner <richard.leitner@skidata.com> | 2020-04-29 11:59:08 +0200 |
|---|---|---|
| committer | Richard Leitner <richard.leitner@skidata.com> | 2020-05-06 07:29:28 +0200 |
| commit | cf9604a4789801d9dfb0cb8ca134ff04b42ae161 (patch) | |
| tree | eed2713307c76d0cc1035551458bd7964c8700a4 /recipes-core/openjdk/patches-openjdk-8 | |
| parent | 2cf52b0f32712a0bd567b34a4fbb8f998abac638 (diff) | |
| download | meta-java-cf9604a4789801d9dfb0cb8ca134ff04b42ae161.tar.gz | |
openjdk-8: remove -Werror
Add patches to remove Werror from the build process. Therefore we also
drop the "-Wno-*" exceptions.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Tested-by: Jacob Kroon <jacob.kroon@gmail.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8')
| -rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/0013-autoconf-remove-Werror.patch | 211 | ||||
| -rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/1013-hotspot-make-disable-Werror.patch | 14 |
2 files changed, 225 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/0013-autoconf-remove-Werror.patch b/recipes-core/openjdk/patches-openjdk-8/0013-autoconf-remove-Werror.patch new file mode 100644 index 0000000..4610c73 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0013-autoconf-remove-Werror.patch | |||
| @@ -0,0 +1,211 @@ | |||
| 1 | # HG changeset patch | ||
| 2 | # User Richard Leitner <richard.leitner@skidata.com> | ||
| 3 | # Date 1588148111 -7200 | ||
| 4 | # Wed Apr 29 10:15:11 2020 +0200 | ||
| 5 | # Node ID e063bb17c5fb8edfbad1bfb5237b69350645ed0b | ||
| 6 | # Parent 041cb274be1207a991e05b041f57a800e8132cff | ||
| 7 | autoconf: remove Werror | ||
| 8 | |||
| 9 | We don't want to mess around with disabling warnings on new | ||
| 10 | compiler versions therefore we remove Werror. | ||
| 11 | |||
| 12 | diff -r 041cb274be12 -r e063bb17c5fb common/autoconf/flags.m4 | ||
| 13 | --- a/common/autoconf/flags.m4 Fri Apr 24 04:22:43 2020 +0100 | ||
| 14 | +++ b/common/autoconf/flags.m4 Wed Apr 29 10:15:11 2020 +0200 | ||
| 15 | @@ -399,7 +399,7 @@ | ||
| 16 | LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS -Wl,-z,relro" | ||
| 17 | fi | ||
| 18 | $2CXXSTD_CXXFLAG="-std=gnu++98" | ||
| 19 | - FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]$2CXXSTD_CXXFLAG -Werror], | ||
| 20 | + FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]$2CXXSTD_CXXFLAG], | ||
| 21 | [], [$2CXXSTD_CXXFLAG=""]) | ||
| 22 | $2CXXFLAGS_JDK="${$2CXXFLAGS_JDK} ${$2CXXSTD_CXXFLAG}" | ||
| 23 | $2JVM_CFLAGS="${$2JVM_CFLAGS} ${$2CXXSTD_CXXFLAG}" | ||
| 24 | @@ -489,17 +489,17 @@ | ||
| 25 | # Notably, -ffp-contract=off needs to be added for GCC >= 4.6, | ||
| 26 | # -mno-fused-madd -fno-strict-aliasing for GCC < 4.6 | ||
| 27 | COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off" | ||
| 28 | - FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]COMPILER_FP_CONTRACT_OFF_FLAG -Werror], | ||
| 29 | + FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]COMPILER_FP_CONTRACT_OFF_FLAG], | ||
| 30 | [], [COMPILER_FP_CONTRACT_OFF_FLAG=""]) | ||
| 31 | if test "x$COMPILER_FP_CONTRACT_OFF_FLAG" = x; then | ||
| 32 | if test "$OPENJDK_TARGET_CPU_ARCH" = "x86" || | ||
| 33 | test "$OPENJDK_TARGET_CPU_ARCH" = "x86_64" || | ||
| 34 | test "$OPENJDK_TARGET_CPU_ARCH" = "ppc"; then | ||
| 35 | M_NO_FUSED_ADD_FLAG="-mno-fused-madd" | ||
| 36 | - FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]M_NO_FUSED_ADD_FLAG -Werror], | ||
| 37 | + FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]M_NO_FUSED_ADD_FLAG], | ||
| 38 | [], [M_NO_FUSED_ADD_FLAG=""]) | ||
| 39 | NO_STRICT_ALIASING_FLAG="-fno-strict-aliasing" | ||
| 40 | - FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]NO_STRICT_ALIASING_FLAG -Werror], | ||
| 41 | + FLAGS_CXX_COMPILER_CHECK_ARGUMENTS([[$]NO_STRICT_ALIASING_FLAG], | ||
| 42 | [], [NO_STRICT_ALIASING_FLAG=""]) | ||
| 43 | if test "x$M_NO_FUSED_ADD_FLAG" != "x" && test "x$NO_STRICT_ALIASING_FLAG" != "x"; then | ||
| 44 | FDLIBM_CFLAGS="$M_NO_FUSED_ADD_FLAG $NO_STRICT_ALIASING_FLAG" | ||
| 45 | @@ -866,11 +866,11 @@ | ||
| 46 | # Notably, value range propagation now assumes that the this pointer of C++ | ||
| 47 | # member functions is non-null. | ||
| 48 | NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks" | ||
| 49 | - FLAGS_COMPILER_CHECK_ARGUMENTS([$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror], | ||
| 50 | + FLAGS_COMPILER_CHECK_ARGUMENTS([$NO_DELETE_NULL_POINTER_CHECKS_CFLAG], | ||
| 51 | [], [NO_DELETE_NULL_POINTER_CHECKS_CFLAG=""]) | ||
| 52 | AC_SUBST([NO_DELETE_NULL_POINTER_CHECKS_CFLAG]) | ||
| 53 | NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse" | ||
| 54 | - FLAGS_COMPILER_CHECK_ARGUMENTS([$NO_LIFETIME_DSE_CFLAG -Werror], | ||
| 55 | + FLAGS_COMPILER_CHECK_ARGUMENTS([$NO_LIFETIME_DSE_CFLAG], | ||
| 56 | [], [NO_LIFETIME_DSE_CFLAG=""]) | ||
| 57 | CFLAGS_JDK="${CFLAGS_JDK} ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}" | ||
| 58 | AC_SUBST([NO_LIFETIME_DSE_CFLAG]) | ||
| 59 | diff -r 041cb274be12 -r e063bb17c5fb common/autoconf/generated-configure.sh | ||
| 60 | --- a/common/autoconf/generated-configure.sh Fri Apr 24 04:22:43 2020 +0100 | ||
| 61 | +++ b/common/autoconf/generated-configure.sh Wed Apr 29 10:15:11 2020 +0200 | ||
| 62 | @@ -41490,12 +41490,12 @@ | ||
| 63 | fi | ||
| 64 | CXXSTD_CXXFLAG="-std=gnu++98" | ||
| 65 | |||
| 66 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5 | ||
| 67 | -$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; } | ||
| 68 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG\"" >&5 | ||
| 69 | +$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG\"... " >&6; } | ||
| 70 | supports=yes | ||
| 71 | |||
| 72 | saved_cxxflags="$CXXFLAGS" | ||
| 73 | - CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror" | ||
| 74 | + CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG" | ||
| 75 | ac_ext=cpp | ||
| 76 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 77 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 78 | @@ -41646,12 +41646,12 @@ | ||
| 79 | NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks" | ||
| 80 | |||
| 81 | |||
| 82 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5 | ||
| 83 | -$as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; } | ||
| 84 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"" >&5 | ||
| 85 | +$as_echo_n "checking if the C compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"... " >&6; } | ||
| 86 | supports=yes | ||
| 87 | |||
| 88 | saved_cflags="$CFLAGS" | ||
| 89 | - CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror" | ||
| 90 | + CFLAGS="$CFLAGS $NO_DELETE_NULL_POINTER_CHECKS_CFLAG" | ||
| 91 | ac_ext=c | ||
| 92 | ac_cpp='$CPP $CPPFLAGS' | ||
| 93 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 94 | @@ -41686,12 +41686,12 @@ | ||
| 95 | fi | ||
| 96 | |||
| 97 | |||
| 98 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5 | ||
| 99 | -$as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; } | ||
| 100 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"" >&5 | ||
| 101 | +$as_echo_n "checking if the C++ compiler supports \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"... " >&6; } | ||
| 102 | supports=yes | ||
| 103 | |||
| 104 | saved_cxxflags="$CXXFLAGS" | ||
| 105 | - CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror" | ||
| 106 | + CXXFLAGS="$CXXFLAG $NO_DELETE_NULL_POINTER_CHECKS_CFLAG" | ||
| 107 | ac_ext=cpp | ||
| 108 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 109 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 110 | @@ -41725,8 +41725,8 @@ | ||
| 111 | fi | ||
| 112 | |||
| 113 | |||
| 114 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"" >&5 | ||
| 115 | -$as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG -Werror\"... " >&6; } | ||
| 116 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"" >&5 | ||
| 117 | +$as_echo_n "checking if both compilers support \"$NO_DELETE_NULL_POINTER_CHECKS_CFLAG\"... " >&6; } | ||
| 118 | supports=no | ||
| 119 | if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi | ||
| 120 | |||
| 121 | @@ -41742,12 +41742,12 @@ | ||
| 122 | NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse" | ||
| 123 | |||
| 124 | |||
| 125 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5 | ||
| 126 | -$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; } | ||
| 127 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG\"" >&5 | ||
| 128 | +$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG\"... " >&6; } | ||
| 129 | supports=yes | ||
| 130 | |||
| 131 | saved_cflags="$CFLAGS" | ||
| 132 | - CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror" | ||
| 133 | + CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG" | ||
| 134 | ac_ext=c | ||
| 135 | ac_cpp='$CPP $CPPFLAGS' | ||
| 136 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 137 | @@ -41781,12 +41781,12 @@ | ||
| 138 | fi | ||
| 139 | |||
| 140 | |||
| 141 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5 | ||
| 142 | -$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; } | ||
| 143 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG\"" >&5 | ||
| 144 | +$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG\"... " >&6; } | ||
| 145 | supports=yes | ||
| 146 | |||
| 147 | saved_cxxflags="$CXXFLAGS" | ||
| 148 | - CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror" | ||
| 149 | + CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG" | ||
| 150 | ac_ext=cpp | ||
| 151 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 152 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 153 | @@ -41820,8 +41820,8 @@ | ||
| 154 | fi | ||
| 155 | |||
| 156 | |||
| 157 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5 | ||
| 158 | -$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; } | ||
| 159 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG\"" >&5 | ||
| 160 | +$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG\"... " >&6; } | ||
| 161 | supports=no | ||
| 162 | if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi | ||
| 163 | |||
| 164 | @@ -41854,12 +41854,12 @@ | ||
| 165 | # -mno-fused-madd -fno-strict-aliasing for GCC < 4.6 | ||
| 166 | COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off" | ||
| 167 | |||
| 168 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"" >&5 | ||
| 169 | -$as_echo_n "checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG -Werror\"... " >&6; } | ||
| 170 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG\"" >&5 | ||
| 171 | +$as_echo_n "checking if the C++ compiler supports \"$COMPILER_FP_CONTRACT_OFF_FLAG\"... " >&6; } | ||
| 172 | supports=yes | ||
| 173 | |||
| 174 | saved_cxxflags="$CXXFLAGS" | ||
| 175 | - CXXFLAGS="$CXXFLAG $COMPILER_FP_CONTRACT_OFF_FLAG -Werror" | ||
| 176 | + CXXFLAGS="$CXXFLAG $COMPILER_FP_CONTRACT_OFF_FLAG" | ||
| 177 | ac_ext=cpp | ||
| 178 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 179 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 180 | @@ -41898,12 +41898,12 @@ | ||
| 181 | test "$OPENJDK_TARGET_CPU_ARCH" = "ppc"; then | ||
| 182 | M_NO_FUSED_ADD_FLAG="-mno-fused-madd" | ||
| 183 | |||
| 184 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"" >&5 | ||
| 185 | -$as_echo_n "checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG -Werror\"... " >&6; } | ||
| 186 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG\"" >&5 | ||
| 187 | +$as_echo_n "checking if the C++ compiler supports \"$M_NO_FUSED_ADD_FLAG\"... " >&6; } | ||
| 188 | supports=yes | ||
| 189 | |||
| 190 | saved_cxxflags="$CXXFLAGS" | ||
| 191 | - CXXFLAGS="$CXXFLAG $M_NO_FUSED_ADD_FLAG -Werror" | ||
| 192 | + CXXFLAGS="$CXXFLAG $M_NO_FUSED_ADD_FLAG" | ||
| 193 | ac_ext=cpp | ||
| 194 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 195 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
| 196 | @@ -41938,12 +41938,12 @@ | ||
| 197 | |||
| 198 | NO_STRICT_ALIASING_FLAG="-fno-strict-aliasing" | ||
| 199 | |||
| 200 | - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"" >&5 | ||
| 201 | -$as_echo_n "checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG -Werror\"... " >&6; } | ||
| 202 | + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG\"" >&5 | ||
| 203 | +$as_echo_n "checking if the C++ compiler supports \"$NO_STRICT_ALIASING_FLAG\"... " >&6; } | ||
| 204 | supports=yes | ||
| 205 | |||
| 206 | saved_cxxflags="$CXXFLAGS" | ||
| 207 | - CXXFLAGS="$CXXFLAG $NO_STRICT_ALIASING_FLAG -Werror" | ||
| 208 | + CXXFLAGS="$CXXFLAG $NO_STRICT_ALIASING_FLAG" | ||
| 209 | ac_ext=cpp | ||
| 210 | ac_cpp='$CXXCPP $CPPFLAGS' | ||
| 211 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' | ||
diff --git a/recipes-core/openjdk/patches-openjdk-8/1013-hotspot-make-disable-Werror.patch b/recipes-core/openjdk/patches-openjdk-8/1013-hotspot-make-disable-Werror.patch new file mode 100644 index 0000000..bc844be --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/1013-hotspot-make-disable-Werror.patch | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | diff -r 12177d88b89c hotspot/make/linux/makefiles/gcc.make | ||
| 2 | --- a/hotspot/make/linux/makefiles/gcc.make Thu Sep 26 07:17:41 2019 +0100 | ||
| 3 | +++ b/hotspot/make/linux/makefiles/gcc.make Wed Apr 29 10:56:10 2020 +0200 | ||
| 4 | @@ -200,8 +200,8 @@ | ||
| 5 | CFLAGS += -pipe | ||
| 6 | endif | ||
| 7 | |||
| 8 | -# Compiler warnings are treated as errors | ||
| 9 | -WARNINGS_ARE_ERRORS = -Werror | ||
| 10 | +# Compiler warnings are not treated as errors | ||
| 11 | +WARNINGS_ARE_ERRORS = -Wno-error | ||
| 12 | |||
| 13 | ifeq ($(USE_CLANG), true) | ||
| 14 | # However we need to clean the code up before we can unrestrictedly enable this option with Clang | ||
