summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch b/recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch
new file mode 100644
index 0000000..fcad102
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch
@@ -0,0 +1,46 @@
1From dc0217d20e3c96203c81acda1c02652755bfcefb Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
3Date: Fri, 2 Mar 2018 10:24:11 +0000
4Subject: [PATCH 7/9] hotspot: os_linux_x86: remove glibc dependencies
5 (fpu_control.h)
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10musl doesn't provide fpu_control.h, open-code the relevant
11bits instead.
12
13Patch adopted from Alpine linux:
14 https://git.alpinelinux.org/cgit/aports/tree/community/openjdk8/icedtea-hotspot-musl.patch?id=4d34f29dddd3934358df7a9607706d09ae0433c3
15
16Upstream-Status: Inappropriate [musl specific]
17Signed-off-by: André Draszik <andre.draszik at jci.com <https://lists.yoctoproject.org/listinfo/yocto>>
18---
19 hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 4 +++-
20 1 file changed, 3 insertions(+), 1 deletion(-)
21
22diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
23index fb96738a..982ce84d 100644
24--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
25+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
26@@ -72,7 +72,6 @@
27 # include <pwd.h>
28 # include <poll.h>
29 # include <ucontext.h>
30-# include <fpu_control.h>
31
32 #ifdef AMD64
33 #define REG_SP REG_RSP
34@@ -543,6 +542,9 @@ JVM_handle_linux_signal(int sig,
35 ShouldNotReachHere();
36 }
37
38+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))
39+#define _FPU_SETCW(cw) __asm__ __volatile__ ("fldcw %0" : : "m" (*&cw))
40+
41 void os::Linux::init_thread_fpu_state(void) {
42 #ifndef AMD64
43 // set fpu to 53 bit precision
44--
452.16.2
46