RFR: 8269668: [aarch64] java.library.path not including /usr/lib64
Severin Gehwolf
sgehwolf at openjdk.java.net
Thu Jul 1 17:35:10 UTC 2021
This fix simplifies the `if` condition to use a default 64-bit library path including default setting when `_LP64` is defined (os has 64-bitness). This should be safe IMHO and seems better than explicitly enumerating all 64 bit Linux architectures. An alternative patch would be:
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 4ebf50ef0d3..5db22f8dff3 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -412,7 +412,7 @@ void os::init_system_properties_values() {
// ...
// 7: The default directories, normally /lib and /usr/lib.
#ifndef OVERRIDE_LIBPATH
- #if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
+ #if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390) || defined(AARCH64)
#define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
#else
#define DEFAULT_LIBPATH "/lib:/usr/lib"
This issue affects older releases and I'd like to get this fix into JDK 17 too. With that in mind, please let me know what the preference is. Note that SPARC support has been removed with JEP 381 in JDK 15. Thoughts?
-------------
Commit messages:
- Change the condition on defined(_LP64) rather than enumerating arches
Changes: https://git.openjdk.java.net/jdk/pull/4657/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4657&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8269668
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.java.net/jdk/pull/4657.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4657/head:pull/4657
PR: https://git.openjdk.java.net/jdk/pull/4657
More information about the hotspot-runtime-dev
mailing list