ports/java/openjdk17/files/extra-patch-src_hotspot_share_runtime_arguments.cpp
Greg Lewis b39d592147 java/openjdk17: Fix the build on some aarch64 machines
* Disable CompressedClassPointers on aarch64.  This fixes the build
  on some aarch64 machines where it previously failed, e.g. RPI4,
  and doesn't seem to affect the build on others (AWS aarch64 hardware).

This is based on and uses a patch initially created by ronald@

PR:		260187
Tested by:	ronald@
2023-01-23 21:19:21 -08:00

21 lines
807 B
C++

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