logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

icedtea-hotspot-musl.patch (1820B)


  1. --- openjdk.orig/hotspot/src/os/linux/vm/jvm_linux.cpp
  2. +++ openjdk/hotspot/src/os/linux/vm/jvm_linux.cpp
  3. @@ -154,7 +154,9 @@
  4. #ifdef SIGSTKFLT
  5. "STKFLT", SIGSTKFLT, /* Stack fault. */
  6. #endif
  7. +#ifdef SIGCLD
  8. "CLD", SIGCLD, /* Same as SIGCHLD (System V). */
  9. +#endif
  10. "CHLD", SIGCHLD, /* Child status has changed (POSIX). */
  11. "CONT", SIGCONT, /* Continue (POSIX). */
  12. "STOP", SIGSTOP, /* Stop, unblockable (POSIX). */
  13. --- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
  14. +++ openjdk/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
  15. @@ -73,7 +73,6 @@
  16. # include <pwd.h>
  17. # include <poll.h>
  18. # include <ucontext.h>
  19. -# include <fpu_control.h>
  20. #ifdef AMD64
  21. #define REG_SP REG_RSP
  22. @@ -532,6 +531,9 @@
  23. ShouldNotReachHere();
  24. }
  25. +
  26. +#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
  27. +#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
  28. void os::Linux::init_thread_fpu_state(void) {
  29. #ifndef AMD64
  30. --- openjdk.orig/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
  31. +++ openjdk/hotspot/src/os_cpu/linux_x86/vm/threadLS_linux_x86.hpp
  32. @@ -32,7 +32,9 @@
  33. // map stack pointer to thread pointer - see notes in threadLS_linux_x86.cpp
  34. #define SP_BITLENGTH 32
  35. #define PAGE_SHIFT 12
  36. + #ifndef PAGE_SIZE
  37. #define PAGE_SIZE (1UL << PAGE_SHIFT)
  38. + #endif
  39. static Thread* _sp_map[1UL << (SP_BITLENGTH - PAGE_SHIFT)];
  40. public:
  41. --- openjdk.orig/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
  42. +++ openjdk/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
  43. @@ -75,7 +75,7 @@
  44. # include <pwd.h>
  45. # include <poll.h>
  46. # include <ucontext.h>
  47. -# include <fpu_control.h>
  48. +# include <linux/types.h> /* provides __u64 */
  49. #ifdef BUILTIN_SIM
  50. #define REG_SP REG_RSP