Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2023 19:08:54 GMT
From:      Greg Lewis <glewis@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fd7028d74968 - main - java/openjdk19: Fix the build on aarch64
Message-ID:  <202302111908.31BJ8sLX074593@gitrepo.freebsd.org>

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

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

commit fd7028d74968d3f692fd42e81514d561398aaa02
Author:     Greg Lewis <glewis@FreeBSD.org>
AuthorDate: 2023-02-11 19:08:28 +0000
Commit:     Greg Lewis <glewis@FreeBSD.org>
CommitDate: 2023-02-11 19:08:28 +0000

    java/openjdk19: Fix the build on aarch64
    
    * Apply a similar patch as was applied to java/openjdk17
---
 java/openjdk19/Makefile                             |  5 +++++
 ...ra-patch-src_hotspot_share_runtime_arguments.cpp | 21 +++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/java/openjdk19/Makefile b/java/openjdk19/Makefile
index a652a90aa78e..abf11ebb221b 100644
--- a/java/openjdk19/Makefile
+++ b/java/openjdk19/Makefile
@@ -157,6 +157,11 @@ CONFIGURE_ARGS+=	--disable-dtrace
 .if ${ARCH} == powerpc64 && ${OSREL:C/\.[0-9]//} == 12
 EXTRA_PATCHES=		${PATCHDIR}/extra-patch-src_hotspot_cpu_ppc_vm__version__ppc.hpp
 .endif
+.if ${ARCH} == aarch64
+CONFIGURE_ARGS+=	--with-boot-jdk-jvmargs=-XX:-UseCompressedClassPointers
+MAKE_ENV+=		JAVA_TOOL_OPTIONS="-XX:-UseCompressedClassPointers"
+EXTRA_PATCHES=		${PATCHDIR}/extra-patch-src_hotspot_share_runtime_arguments.cpp
+.endif
 
 .if empty(ICONV_LIB)
 ICONV_CFLAGS=	-DLIBICONV_PLUG
diff --git a/java/openjdk19/files/extra-patch-src_hotspot_share_runtime_arguments.cpp b/java/openjdk19/files/extra-patch-src_hotspot_share_runtime_arguments.cpp
new file mode 100644
index 000000000000..80ef25c560f6
--- /dev/null
+++ b/java/openjdk19/files/extra-patch-src_hotspot_share_runtime_arguments.cpp
@@ -0,0 +1,21 @@
+--- src/hotspot/share/runtime/arguments.cpp.orig	2023-01-15 10:13:55.469227000 -0800
++++ src/hotspot/share/runtime/arguments.cpp	2023-01-15 10:20:49.218102000 -0800
+@@ -1557,6 +1557,10 @@
+ // set_use_compressed_oops().
+ void Arguments::set_use_compressed_klass_ptrs() {
+ #ifdef _LP64
++#  if defined(__FreeBSD__) && defined(AARCH64)
++  FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
++  FLAG_SET_ERGO(UseCompressedClassPointers, false);
++#  else
+   // On some architectures, the use of UseCompressedClassPointers implies the use of
+   // UseCompressedOops. The reason is that the rheap_base register of said platforms
+   // is reused to perform some optimized spilling, in order to use rheap_base as a
+@@ -1582,6 +1586,7 @@
+       }
+     }
+   }
++#  endif // __FreeBSD__ && AARCH64
+ #endif // _LP64
+ }
+ 



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