aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2024-08-01 16:05:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2024-08-07 16:44:49 +0000
commit4c37f9f5f253a5701fa94ddfc00520889bca9ea4 (patch)
tree4ee542dcfd42a667fe12dffa807bfd8bdb44bce7
parentd2ae63c6feffda05eb643520dd851451ee337f53 (diff)
downloadports-4c37f9f5f253a5701fa94ddfc00520889bca9ea4.tar.gz
ports-4c37f9f5f253a5701fa94ddfc00520889bca9ea4.zip
java/openjdk17: fix build with clang 19
Clang 19 has a number of new warnings, and because java/openjdk17 compiles with -Werror by default, it results in errors similar to: /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.12-7-1/src/hotspot/os/posix/signals_posix.cpp:1681:20: error: cast from 'void (*)(int, siginfo_t *, ucontext_t *)' (aka 'void (*)(int, __siginfo *, __ucontext *)') to 'void (*)(int)' converts to incompatible function type [-Werror,-Wcast-function-type-mismatch] 1681 | act.sa_handler = (void (*)(int)) SR_handler; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ I propose to disable warnings-as-errors for this port, similar to what is already done for openjdk8 and openjdk11. It does not make sense to have this on by default, unless you are an upstream maintainer. PR: 280561 Approved by: glewis (maintainer) MFH: 2024Q3
-rw-r--r--java/openjdk17/Makefile6
1 files changed, 1 insertions, 5 deletions
diff --git a/java/openjdk17/Makefile b/java/openjdk17/Makefile
index a07a8f217518..f93a39d7ddb3 100644
--- a/java/openjdk17/Makefile
+++ b/java/openjdk17/Makefile
@@ -139,11 +139,7 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA
--with-extra-cxxflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFAULT}"
.else
MAKE_ENV+= USE_CLANG=true
-EXTRA_CFLAGS+= -Wno-unused-but-set-parameter
-EXTRA_CFLAGS+= -Wno-bitwise-instead-of-logical
-EXTRA_CFLAGS+= -Wno-deprecated-non-prototype
-CONFIGURE_ARGS+= --with-extra-cflags="${EXTRA_CFLAGS}"
-CONFIGURE_ARGS+= --with-extra-cxxflags="${EXTRA_CFLAGS}"
+CONFIGURE_ARGS+= --disable-warnings-as-errors
.endif
.if ${ARCH} == aarch64 || ${ARCH:Mpowerpc64*}