1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

java/openjdk19: Fix the build on aarch64

* Apply a similar patch as was applied to java/openjdk17
This commit is contained in:
Greg Lewis 2023-02-11 11:08:28 -08:00
parent 38f20cd9d1
commit fd7028d749
2 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -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
}