depot/third_party/nixpkgs/pkgs/development/compilers/openjdk/fix-library-path-jdk11.patch
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

37 lines
1.6 KiB
Diff

diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 0dbe03349e..847d56778d 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -326,13 +326,13 @@ void os::init_system_properties_values() {
// ...
// 7: The default directories, normally /lib and /usr/lib.
#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
- #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
+ #define DEFAULT_LIBPATH ""
#else
- #define DEFAULT_LIBPATH "/lib:/usr/lib"
+ #define DEFAULT_LIBPATH ""
#endif
// Base path of extensions installed on the system.
-#define SYS_EXT_DIR "/usr/java/packages"
+#define SYS_EXT_DIR ""
#define EXTENSIONS_DIR "/lib/ext"
// Buffer that fits several sprintfs.
@@ -392,13 +392,13 @@ void os::init_system_properties_values() {
strlen(v) + 1 +
sizeof(SYS_EXT_DIR) + sizeof("/lib/") + sizeof(DEFAULT_LIBPATH) + 1,
mtInternal);
- sprintf(ld_library_path, "%s%s" SYS_EXT_DIR "/lib:" DEFAULT_LIBPATH, v, v_colon);
+ sprintf(ld_library_path, "%s", v);
Arguments::set_library_path(ld_library_path);
FREE_C_HEAP_ARRAY(char, ld_library_path);
}
// Extensions directories.
- sprintf(buf, "%s" EXTENSIONS_DIR ":" SYS_EXT_DIR EXTENSIONS_DIR, Arguments::get_java_home());
+ sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home());
Arguments::set_ext_dirs(buf);
FREE_C_HEAP_ARRAY(char, buf);