< prev index next >

src/os/bsd/vm/os_bsd.cpp

Print this page
rev 9009 : 8136556: Add the ability to perform static builds of MacOSX x64 binaries
Reviewed-by: ihse, bdelsart, gadams, lfoltan, rriggs, hseigel, twisti

*** 440,449 **** --- 440,453 ---- *(strrchr(buf, '/')) = '\0'; // Get rid of /libjvm.so. pslash = strrchr(buf, '/'); 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) { pslash = strrchr(buf, '/'); if (pslash != NULL) {
*** 1388,1397 **** --- 1392,1404 ---- // in case of error it checks if .dll/.so was built for the // same architecture as Hotspot is running on #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 return result; }
*** 1399,1411 **** --- 1406,1422 ---- // Read system error message into ebuf ::strncpy(ebuf, ::dlerror(), ebuflen-1); 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 return result; }
*** 1574,1583 **** --- 1585,1595 ---- arch_array[running_arch_index].name); } } return NULL; + #endif // STATIC_BUILD } #endif // !__APPLE__ void* os::get_default_process_handle() { #ifdef __APPLE__
< prev index next >