git: 846ff4e95291 - main - java/openjdk11: Restore LLVM/Clang 13 workaround
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 09 Feb 2022 04:45:12 UTC
The branch main has been updated by glewis:
URL: https://cgit.FreeBSD.org/ports/commit/?id=846ff4e9529104b008946f89b9fb3d3a27c13773
commit 846ff4e9529104b008946f89b9fb3d3a27c13773
Author: Greg Lewis <glewis@FreeBSD.org>
AuthorDate: 2022-02-09 04:42:45 +0000
Commit: Greg Lewis <glewis@FreeBSD.org>
CommitDate: 2022-02-09 04:45:06 +0000
java/openjdk11: Restore LLVM/Clang 13 workaround
This restores the previous LLVM/Clang 13 workaround. I had thought
the upstream changes would address this, but still seeing reports of
crashes when compiled with LLVM/Clang 13.
PR: 260319
Reported by: various
---
java/openjdk11/Makefile | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile
index dafdc32fb27e..5537b8b3dbb0 100644
--- a/java/openjdk11/Makefile
+++ b/java/openjdk11/Makefile
@@ -142,7 +142,12 @@ CONFIGURE_ARGS+= --with-extra-ldflags="-Wl,-rpath=${LOCALBASE}/lib/gcc${GCC_DEFA
.else
MAKE_ENV+= USE_CLANG=true
.if ${COMPILER_VERSION} >= 130
-CONFIGURE_ARGS+= --with-extra-cflags="-Wno-unused-but-set-parameter"
+# PR258954: OpenJDK <= 13 crash due to undefined behavior with clang >= 13
+# See also https://bugs.openjdk.java.net/browse/JDK-8229258
+LLVM_VER= 12
+BUILD_DEPENDS+= clang${LLVM_VER}:devel/llvm${LLVM_VER}
+CC= ${LOCALBASE}/bin/clang${LLVM_VER}
+CXX= ${LOCALBASE}/bin/clang++${LLVM_VER}
.endif
.endif