From 3668ba76f44bc778ba4446236088c22948a644d0 Mon Sep 17 00:00:00 2001 From: André Draszik Date: Tue, 6 Mar 2018 11:01:53 +0200 Subject: openjdk-8: fix musl build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add various patches to make it work in musl. Some of them are generic enough to be applied for all builds, some need to be specific to musl. Signed-off-by: André Draszik Signed-off-by: Maxin B. John --- ...linux_x86-remove-glibc-dependencies-fpu_c.patch | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch') 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 @@ +From dc0217d20e3c96203c81acda1c02652755bfcefb Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= > +Date: Fri, 2 Mar 2018 10:24:11 +0000 +Subject: [PATCH 7/9] hotspot: os_linux_x86: remove glibc dependencies + (fpu_control.h) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +musl doesn't provide fpu_control.h, open-code the relevant +bits instead. + +Patch adopted from Alpine linux: + https://git.alpinelinux.org/cgit/aports/tree/community/openjdk8/icedtea-hotspot-musl.patch?id=4d34f29dddd3934358df7a9607706d09ae0433c3 + +Upstream-Status: Inappropriate [musl specific] +Signed-off-by: André Draszik > +--- + hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --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 +index fb96738a..982ce84d 100644 +--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp ++++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp +@@ -72,7 +72,6 @@ + # include + # include + # include +-# include + + #ifdef AMD64 + #define REG_SP REG_RSP +@@ -543,6 +542,9 @@ JVM_handle_linux_signal(int sig, + ShouldNotReachHere(); + } + ++#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 +-- +2.16.2 + -- cgit v1.2.3-54-g00ecf