summaryrefslogtreecommitdiff
path: root/java/openjdk8
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-09-14 10:52:30 +0200
committerDimitry Andric <dim@FreeBSD.org>2022-09-14 10:52:48 +0200
commita705af9bfceba0fafc2612898a7afcedcb7c1865 (patch)
tree26b03871747fc31f253e36e45a5a85595a770bec /java/openjdk8
parentmath/clfft: Unbreak by fixing C++ error (diff)
java/openjdk8: Restore workaround for aarch64 assertions
See also <https://bugs.openjdk.org/browse/JDK-8247766>. Even though the upstream fix has been applied to this version of the JDK, some users still report the assertion "guarantee(val < (1U << nbits)) failed: Field too big for insn" occurring, when it is built with recent versions of clang. Therefore, restore the workaround that uses clang 12 to build the JDK on aarch64. PR: 264065 MFH: 2022Q3
Diffstat (limited to 'java/openjdk8')
-rw-r--r--java/openjdk8/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile
index 424b00ec9720..55def79f9ee0 100644
--- a/java/openjdk8/Makefile
+++ b/java/openjdk8/Makefile
@@ -204,6 +204,16 @@ LIB_DEPENDS+= libffi.so:devel/libffi
.if ${COMPILER_TYPE} == clang
MAKE_ENV+= COMPILER_WARNINGS_FATAL=false USE_CLANG=true
CONFIGURE_ENV+= LIBCXX="-lc++"
+.if ${COMPILER_VERSION} >= 130 && ${ARCH} == aarch64
+# PR258954: see <https://bugs.openjdk.org/browse/JDK-8247766>. Even though the
+# upstream fix has been applied to this version of the JDK, users still report
+# the assertion "guarantee(val < (1U << nbits)) failed: Field too big for insn"
+# occurring, when it is built with recent versions of clang.
+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
# GCC is broken with PCH: https://lists.freebsd.org/pipermail/svn-src-all/2015-March/101722.html