Blame SOURCES/jdk8269668-rh1977671-aarch64_lib_path_fix.patch

a531bc
From ec03fdb752f2dc0833784a6877a4c232a8cdd9d2 Mon Sep 17 00:00:00 2001
a531bc
From: Severin Gehwolf <sgehwolf@redhat.com>
a531bc
Date: Wed, 14 Jul 2021 12:06:39 +0200
a531bc
Subject: [PATCH] Backport e14801cdd9b108aa4ca47d0bc1dc67fca575764c
a531bc
a531bc
---
a531bc
 src/hotspot/os/linux/os_linux.cpp | 7 +++++++
a531bc
 1 file changed, 7 insertions(+)
a531bc
a531bc
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
a531bc
index e8baf704e3a..12b75b733b5 100644
a531bc
--- a/src/hotspot/os/linux/os_linux.cpp
a531bc
+++ b/src/hotspot/os/linux/os_linux.cpp
a531bc
@@ -413,8 +413,15 @@ void os::init_system_properties_values() {
a531bc
   //        7: The default directories, normally /lib and /usr/lib.
a531bc
 #if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
a531bc
   #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
a531bc
+#else
a531bc
+#if defined(AARCH64)
a531bc
+  // Use 32-bit locations first for AARCH64 (a 64-bit architecture), since some systems
a531bc
+  // might not adhere to the FHS and it would be a change in behaviour if we used
a531bc
+  // DEFAULT_LIBPATH of other 64-bit architectures which prefer the 64-bit paths.
a531bc
+  #define DEFAULT_LIBPATH "/lib:/usr/lib:/usr/lib64:/lib64"
a531bc
 #else
a531bc
   #define DEFAULT_LIBPATH "/lib:/usr/lib"
a531bc
+#endif // AARCH64
a531bc
 #endif
a531bc
 
a531bc
 // Base path of extensions installed on the system.
a531bc
-- 
a531bc
2.31.1
a531bc