Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2025 21:43:23 GMT
From:      Piotr Kubaj <pkubaj@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 5b9206709f00 - main - java/openjdk11: add support for powerpc
Message-ID:  <202501122143.50CLhNY5097476@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5b9206709f00cd440f33774ae0a5fd879da5f245

commit 5b9206709f00cd440f33774ae0a5fd879da5f245
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-01-11 13:09:17 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-01-12 21:37:03 +0000

    java/openjdk11: add support for powerpc
---
 java/openjdk11/Makefile                             |  9 +++++++--
 ...-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp | 21 +++++++++++++++++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/java/openjdk11/Makefile b/java/openjdk11/Makefile
index 7e2f7ace60a1..8a5ebd5059b2 100644
--- a/java/openjdk11/Makefile
+++ b/java/openjdk11/Makefile
@@ -12,7 +12,7 @@ WWW=		https://openjdk.java.net/
 
 LICENSE=	GPLv2
 
-ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7 i386 powerpc64 powerpc64le
+ONLY_FOR_ARCHS=	aarch64 amd64 armv6 armv7 i386 powerpc powerpc64 powerpc64le
 
 BUILD_DEPENDS=	zip:archivers/zip \
 		autoconf>0:devel/autoconf \
@@ -49,7 +49,7 @@ MAKE_ENV=	LANG="C" \
 		CPP=${CPP} \
 		MAKEFLAGS=""
 
-JDK_OSARCH=	bsd-${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/i386/x86/:S/powerpc64/ppc64/}
+JDK_OSARCH=	bsd-${ARCH:S/amd64/x86_64/:C/armv.*/arm/:S/i386/x86/:S/powerpc/ppc/}
 JDK_BUILDDIR=	${WRKSRC}/build/${JDK_OSARCH}-normal-${JDK_BUILD_JVM}-${JDK_BUILD_TYPE}
 .if defined(BUILD_JRE)
 JDK_IMAGEDIR=	${JDK_BUILDDIR}/images/jre
@@ -143,7 +143,12 @@ BOOTSTRAPJDKDIR?=	${LOCALBASE}/bootstrap-openjdk11
 BUILD_DEPENDS+=		${BOOTSTRAPJDKDIR}/bin/javac:java/bootstrap-openjdk11
 .endif
 
+.if ${ARCH} == powerpc
+CONFIGURE_ARGS+=	--with-jvm-variants=zero
+JDK_BUILD_JVM=	zero
+.else
 JDK_BUILD_JVM=	server
+.endif
 
 MAKE_ENV+=		--with-toolchain-type=${COMPILER_TYPE}
 CONFIGURE_ARGS+=	--with-toolchain-type=${COMPILER_TYPE}
diff --git a/java/openjdk11/files/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp b/java/openjdk11/files/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp
new file mode 100644
index 000000000000..d05e5b4ab266
--- /dev/null
+++ b/java/openjdk11/files/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp
@@ -0,0 +1,21 @@
+--- src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp.orig	2025-01-10 18:09:55 UTC
++++ src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
+@@ -432,18 +432,6 @@ extern "C" {
+ // Implementations of atomic operations not supported by processors.
+ //  -- http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Atomic-Builtins.html
+ 
+-#ifndef _LP64
+-extern "C" {
+-  long long unsigned int __sync_val_compare_and_swap_8(
+-    volatile void *ptr,
+-    long long unsigned int oldval,
+-    long long unsigned int newval) {
+-    ShouldNotCallThis();
+-    return 0; // silence compiler warnings
+-  }
+-};
+-#endif // !_LP64
+-
+ #ifndef PRODUCT
+ void os::verify_stack_alignment() {
+ }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501122143.50CLhNY5097476>