--- a/hotspot/src/os/bsd/vm/os_bsd.cpp Wed Jul 05 20:53:25 2017 +0200
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Oct 19 13:21:37 2015 -0400
@@ -442,6 +442,10 @@
if (pslash != NULL) {
*pslash = '\0'; // Get rid of /{client|server|hotspot}.
}
+#ifdef STATIC_BUILD
+ strcat(buf, "/lib");
+#endif
+
Arguments::set_dll_dir(buf);
if (pslash != NULL) {
@@ -1390,6 +1394,9 @@
#ifdef __APPLE__
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
+#ifdef STATIC_BUILD
+ return os::get_default_process_handle();
+#else
void * result= ::dlopen(filename, RTLD_LAZY);
if (result != NULL) {
// Successful loading
@@ -1401,9 +1408,13 @@
ebuf[ebuflen-1]='\0';
return NULL;
+#endif // STATIC_BUILD
}
#else
void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
+#ifdef STATIC_BUILD
+ return os::get_default_process_handle();
+#else
void * result= ::dlopen(filename, RTLD_LAZY);
if (result != NULL) {
// Successful loading
@@ -1576,6 +1587,7 @@
}
return NULL;
+#endif // STATIC_BUILD
}
#endif // !__APPLE__