diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-02-19 07:48:39 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-02-19 07:50:34 +0000 |
commit | 8df009284c4c1f79abd2360b5c373fb391c34706 (patch) | |
tree | faebca0cc634d1472f721acbe1e63214461e88f0 /main/openjdk6/icedtea-hotspot-uclibc-fixes.patch | |
parent | 20eae13751573f2ba970f44d16674cbaaf69e101 (diff) | |
download | aports-8df009284c4c1f79abd2360b5c373fb391c34706.tar.bz2 aports-8df009284c4c1f79abd2360b5c373fb391c34706.tar.xz |
main/openjdk6: fix musl build
exclude hotspot agent as thread_db is not properly supported
in musl.
Diffstat (limited to 'main/openjdk6/icedtea-hotspot-uclibc-fixes.patch')
-rw-r--r-- | main/openjdk6/icedtea-hotspot-uclibc-fixes.patch | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch b/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch index fb75ffc340..0cf4eade04 100644 --- a/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch +++ b/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch @@ -1,6 +1,6 @@ --- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp +++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp -@@ -53,7 +53,6 @@ +@@ -109,7 +109,6 @@ # include <string.h> # include <syscall.h> # include <sys/sysinfo.h> @@ -8,18 +8,29 @@ # include <sys/ipc.h> # include <sys/shm.h> # include <link.h> -@@ -553,9 +552,7 @@ - os::Linux::set_glibc_version(str); - } else { - // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version() -- static char _gnu_libc_version[32]; -- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version), -- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release()); -+ static char _gnu_libc_version[32] = "2.9"; - os::Linux::set_glibc_version(_gnu_libc_version); +@@ -601,6 +600,13 @@ + // detecting pthread library + + void os::Linux::libpthread_init() { ++#if 1 ++ // Hard code Alpine Linux supported uclibc/musl compatible settings ++ os::Linux::set_glibc_version("glibc 2.9"); ++ os::Linux::set_libpthread_version("NPTL"); ++ os::Linux::set_is_NPTL(); ++ os::Linux::set_is_floating_stack(); ++#else + // Save glibc and pthread version strings. Note that _CS_GNU_LIBC_VERSION + // and _CS_GNU_LIBPTHREAD_VERSION are supported in glibc >= 2.3.2. Use a + // generic name for earlier versions. +@@ -659,6 +665,7 @@ + if (os::Linux::is_NPTL() || os::Linux::supports_variable_stack_size()) { + os::Linux::set_is_floating_stack(); } ++#endif + } -@@ -2434,11 +2431,7 @@ + ///////////////////////////////////////////////////////////////////////////// +@@ -2604,11 +2611,7 @@ // If we are running with earlier version, which did not have symbol versions, // we should use the base version. void* os::Linux::libnuma_dlsym(void* handle, const char *name) { @@ -32,12 +43,11 @@ } bool os::Linux::libnuma_init() { -@@ -4446,7 +4439,22 @@ +@@ -4783,7 +4786,25 @@ // Linux doesn't yet have a (official) notion of processor sets, // so just return the system wide load average. int os::loadavg(double loadavg[], int nelem) { -- return ::getloadavg(loadavg, nelem); -+ ++#ifdef __UCLIBC__ + FILE *LOADAVG; + double avg[3] = { 0.0, 0.0, 0.0 }; + int i, res = -1;; @@ -53,18 +63,20 @@ + } + + return res; ++#else + return ::getloadavg(loadavg, nelem); ++#endif } void os::pause() { -Only in openjdk: hotspot/src/os/linux/vm/os_linux.cpp.orig --- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp -@@ -231,14 +231,14 @@ +@@ -238,14 +238,14 @@ // checking for nanness #ifdef SOLARIS #ifdef SPARC -inline int g_isnan(float f) { return isnanf(f); } -+inline int g_isnan(float f) { return __isnanf(f); } ++inline int g_isnan(float f) { return isnan(f); } #else // isnanf() broken on Intel Solaris use isnand() inline int g_isnan(float f) { return isnand(f); } @@ -72,11 +84,11 @@ Only in openjdk: hotspot/src/os/linux/vm/os_linux.cpp.orig inline int g_isnan(double f) { return isnand(f); } #elif LINUX -inline int g_isnan(float f) { return isnanf(f); } -+inline int g_isnan(float f) { return __isnanf(f); } ++inline int g_isnan(float f) { return isnan(f); } inline int g_isnan(double f) { return isnan(f); } #else #error "missing platform-specific definition here" -@@ -252,8 +252,8 @@ +@@ -259,8 +259,8 @@ // Checking for finiteness @@ -87,4 +99,3 @@ Only in openjdk: hotspot/src/os/linux/vm/os_linux.cpp.orig // Wide characters -Only in openjdk: hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig |