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 --- ...0005-hotspot-use-correct-include-for-poll.patch | 85 ++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch b/recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch new file mode 100644 index 0000000..8b3420e --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0005-hotspot-use-correct-include-for-poll.patch @@ -0,0 +1,85 @@ +From 79e35bd203b40979e1d241a04d6d9df373327bef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= > +Date: Tue, 27 Feb 2018 09:28:06 +0000 +Subject: [PATCH 5/9] hotspot: use correct include for poll +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compiling against musl-libc gives the following warning (which is +treated as error due to -Werror): +.../recipe-sysroot/usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] + #warning redirecting incorrect #include to + ^~~~~~~ +etc. + +To use poll(), poll.h needs to be included, even on glibc - do so using +the following command: + for i in $(git grep sys/poll\.h hotspot | cut -f 1 -d : | sort -u) ; do + sed -e 's,sys/poll\.h,poll.h,g' -i ${i} + done + +Upstream-Status: Pending +Signed-off-by: André Draszik > +--- + hotspot/src/os/aix/vm/os_aix.inline.hpp | 2 +- + hotspot/src/os/bsd/vm/os_bsd.inline.hpp | 2 +- + hotspot/src/os/linux/vm/os_linux.inline.hpp | 2 +- + hotspot/src/os/solaris/vm/os_solaris.inline.hpp | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/hotspot/src/os/aix/vm/os_aix.inline.hpp b/hotspot/src/os/aix/vm/os_aix.inline.hpp +index a97c94c0..e2974ee1 100644 +--- a/hotspot/src/os/aix/vm/os_aix.inline.hpp ++++ b/hotspot/src/os/aix/vm/os_aix.inline.hpp +@@ -34,7 +34,7 @@ + + #include + #include +-#include ++#include + #include + #include + +diff --git a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp +index 10b39941..3144a29c 100644 +--- a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp ++++ b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp +@@ -33,7 +33,7 @@ + + #include + #include +-#include ++#include + #include + + inline void* os::thread_local_storage_at(int index) { +diff --git a/hotspot/src/os/linux/vm/os_linux.inline.hpp b/hotspot/src/os/linux/vm/os_linux.inline.hpp +index 10d56d89..b9b2b775 100644 +--- a/hotspot/src/os/linux/vm/os_linux.inline.hpp ++++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp +@@ -33,7 +33,7 @@ + + #include + #include +-#include ++#include + #include + + inline void* os::thread_local_storage_at(int index) { +diff --git a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp +index 921fcf7c..5d80a7d0 100644 +--- a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp ++++ b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp +@@ -33,7 +33,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +-- +2.16.2 + -- cgit v1.2.3-54-g00ecf