aports/community/openjdk8-corretto/icedtea-hotspot-musl.patch
Celeste abc39eddbf community/openjdk8-corretto: new aport
https://github.com/corretto/corretto-8
Amazon's no-cost, multi-platform, production-ready distribution of OpenJDK 8

This aport can be cross-compiled with the same method used
for openjdk11/17/21, unlike community/openjdk8 (icedtea).
2024-09-10 03:20:26 +00:00

39 lines
1.4 KiB
Diff

diff --git openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
index 38388cb..2505ba8 100644
--- openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
@@ -72,9 +72,6 @@
# include <pwd.h>
# include <poll.h>
# include <ucontext.h>
-#ifndef AMD64
-# include <fpu_control.h>
-#endif
#ifdef AMD64
#define REG_SP REG_RSP
@@ -544,6 +543,9 @@ JVM_handle_linux_signal(int sig,
return true; // Mute compiler
}
+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
+
void os::Linux::init_thread_fpu_state(void) {
#ifndef AMD64
// set fpu to 53 bit precision
diff --git openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
index f3f2f26..6b50cfa 100644
--- openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
+++ openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
@@ -32,7 +32,9 @@
// map stack pointer to thread pointer - see notes in threadLS_linux_x86.cpp
#define SP_BITLENGTH 32
#define PAGE_SHIFT 12
+ #ifndef PAGE_SIZE
#define PAGE_SIZE (1UL << PAGE_SHIFT)
+ #endif
static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
public: