Skip to content

Commit 3378cc4

Browse files
committed
java/openjdk8 java/openjdk11 java/openjdk17 java/openjdk18 java/openjdk19 java/openjdk20 java/openjdk21 java/openjdk22: disable warnings as errors
Generally disable warnings-as-errors for all openjdk ports, removing all the conditionals we have now for particular architectures and/or compilers. It does not make sense to have this on by default, unless you are an upstream maintainer. PR: 281188 Approved by: maintainer timeout (2 weeks) MFH: 2024Q3
1 parent ad05a2f commit 3378cc4

File tree

8 files changed

+8
-23
lines changed

8 files changed

+8
-23
lines changed

java/openjdk11/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ JDK_BUILD_JVM= server
148148

149149
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
150150
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
151+
CONFIGURE_ARGS+= --disable-warnings-as-errors
151152

152153
.if ${COMPILER_TYPE} == gcc
153154
USE_GCC= yes
@@ -159,9 +160,6 @@ CONFIGURE_ARGS+=--disable-precompiled-headers
159160
MAKE_ENV+= USE_CLANG=true
160161
.endif
161162

162-
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH:Marmv*} || ${ARCH:Mpowerpc64*}
163-
CONFIGURE_ARGS+= --disable-warnings-as-errors
164-
.endif
165163
.if ${ARCH} == aarch64 || ${ARCH:Marmv*}
166164
CONFIGURE_ARGS+= --disable-dtrace
167165
.endif

java/openjdk17/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ JDK_BUILD_JVM= server
131131

132132
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
133133
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
134+
CONFIGURE_ARGS+= --disable-warnings-as-errors
134135

135136
.if ${COMPILER_TYPE} == gcc
136137
USE_GCC= yes
@@ -139,12 +140,8 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA
139140
--with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}"
140141
.else
141142
MAKE_ENV+= USE_CLANG=true
142-
CONFIGURE_ARGS+= --disable-warnings-as-errors
143143
.endif
144144

145-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
146-
CONFIGURE_ARGS+= --disable-warnings-as-errors
147-
.endif
148145
.if ${ARCH} == aarch64
149146
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
150147
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk18/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ JDK_BUILD_JVM= server
141141

142142
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
143143
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
144+
CONFIGURE_ARGS+= --disable-warnings-as-errors
144145

145146
.if ${COMPILER_TYPE} == gcc
146147
USE_GCC= yes
@@ -156,9 +157,6 @@ CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
156157
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
157158
.endif
158159

159-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
160-
CONFIGURE_ARGS+= --disable-warnings-as-errors
161-
.endif
162160
.if ${ARCH} == aarch64
163161
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
164162
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk19/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ JDK_BUILD_JVM= server
131131

132132
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
133133
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
134+
CONFIGURE_ARGS+= --disable-warnings-as-errors
134135

135136
.if ${COMPILER_TYPE} == gcc
136137
USE_GCC= yes
@@ -146,9 +147,6 @@ CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
146147
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
147148
.endif
148149

149-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
150-
CONFIGURE_ARGS+= --disable-warnings-as-errors
151-
.endif
152150
.if ${ARCH} == aarch64
153151
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
154152
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk20/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ JDK_BUILD_JVM= server
130130

131131
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
132132
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
133+
CONFIGURE_ARGS+= --disable-warnings-as-errors
133134

134135
.if ${COMPILER_TYPE} == gcc
135136
USE_GCC= yes
@@ -145,9 +146,6 @@ CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
145146
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
146147
.endif
147148

148-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
149-
CONFIGURE_ARGS+= --disable-warnings-as-errors
150-
.endif
151149
.if ${ARCH} == aarch64
152150
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
153151
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk21/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ JDK_BUILD_JVM= server
130130

131131
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
132132
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
133+
CONFIGURE_ARGS+= --disable-warnings-as-errors
133134

134135
.if ${COMPILER_TYPE} == gcc
135136
USE_GCC= yes
@@ -145,9 +146,6 @@ CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
145146
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
146147
.endif
147148

148-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
149-
CONFIGURE_ARGS+= --disable-warnings-as-errors
150-
.endif
151149
.if ${ARCH} == aarch64
152150
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
153151
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk22/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ JDK_BUILD_JVM= server
130130

131131
MAKE_ENV+= --with-toolchain-type=${COMPILER_TYPE}
132132
CONFIGURE_ARGS+= --with-toolchain-type=${COMPILER_TYPE}
133+
CONFIGURE_ARGS+= --disable-warnings-as-errors
133134

134135
.if ${COMPILER_TYPE} == gcc
135136
USE_GCC= yes
@@ -145,9 +146,6 @@ CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
145146
CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
146147
.endif
147148

148-
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}
149-
CONFIGURE_ARGS+= --disable-warnings-as-errors
150-
.endif
151149
.if ${ARCH} == aarch64
152150
CONFIGURE_ARGS+= --with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers --disable-dtrace
153151
MAKE_ENV+= JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"

java/openjdk8/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ LIB_DEPENDS+= libffi.so:devel/libffi
203203
.endif
204204

205205
.if ${COMPILER_TYPE} == clang
206-
MAKE_ENV+= COMPILER_WARNINGS_FATAL=false USE_CLANG=true
206+
MAKE_ENV+= USE_CLANG=true
207207
CONFIGURE_ENV+= LIBCXX="-lc++"
208208
# clang 16 defaults to C++17, which no longer allows the 'register' keyword.
209209
# There is an upstream commit that removes all the individual 'register'

0 commit comments

Comments
 (0)