git: 4545964dd7da - main - java/openjdk11: build with base clang on powerpc64*
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 23 Oct 2026 11:48:58 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4545964dd7dad61dba2722654ee130ddde7c0eea
commit 4545964dd7dad61dba2722654ee130ddde7c0eea
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-20 07:54:03 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-23 11:48:14 +0000
java/openjdk11: build with base clang on powerpc64*
Since clang 13, VMRegImpl::set_regName() compiles to nothing: it calls
name() through a null Register, which clang takes as unreachable. On
powerpc64 the empty function is just the traceback table marker, so java
dies with SIGILL right at startup. amd64 and aarch64 get away with the
same code because their empty function falls through into the next one.
-fno-delete-null-pointer-checks keeps the function body around.
---
java/openjdk11/Makefile | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile
index 617c2646baa4..e7b3960d1f29 100644
--- a/java/openjdk11/Makefile
+++ b/java/openjdk11/Makefile
@@ -1,7 +1,7 @@
PORTNAME= openjdk
DISTVERSIONPREFIX= jdk-
DISTVERSION= ${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_PATCH_VERSION}+${JDK_BUILD_NUMBER}-${BSD_JDK_VERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= java devel
PKGNAMESUFFIX?= ${JDK_MAJOR_VERSION}
MASTER_SITES= LOCAL/openjdk/:boot
@@ -158,12 +158,10 @@ CONFIGURE_ARGS+=--disable-precompiled-headers
# it is up to upstream project to fix these or not
CFLAGS+= -Wno-deprecated-builtins -Wno-inline-asm -Wno-unknown-attributes
MAKE_ENV+= USE_CLANG=true
-.if ${ARCH:Mpowerpc64*}
-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
+# clang >= 13 folds VMRegImpl::set_regName() (null Register this) into unreachable;
+# on PPC64 the empty function is just the traceback marker -> SIGILL at VM init
+CFLAGS_powerpc64= -fno-delete-null-pointer-checks
+CFLAGS_powerpc64le= -fno-delete-null-pointer-checks
.endif
.if ${ARCH} == aarch64 || ${ARCH:Marmv*}