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 --- .../0008-jdk-use-correct-include-for-signal.patch | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch b/recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch new file mode 100644 index 0000000..406de52 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/0008-jdk-use-correct-include-for-signal.patch @@ -0,0 +1,89 @@ +From a063ee68bc0dd7dbf9737df4ee191e98796f2f6a 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 8/9] jdk: use correct include for signal +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: +| In file included from jdk/src/solaris/javavm/export/jvm_md.h:68:0, +| from jdk/src/share/javavm/export/jvm.h:32, +| from jdk/src/share/native/java/net/net_util.h:29, +| from jdk/src/solaris/native/java/net/InetAddressImplFactory.c:28: +| usr/include/sys/signal.h:1:2: warning: #warning redirecting incorrect #include to [-Wcpp] +| #warning redirecting incorrect #include to +| ^~~~~~~ +etc. + +As per the message, signal.h needs to be included instead - do so using +the following command: + for i in $(git grep sys/signal\.h jdk | cut -f 1 -d : | sort -u) ; do + sed -e 's,sys/signal\.h,signal.h,g' -i ${i} + done + +Upstream-Status: Pending +Signed-off-by: André Draszik > +--- + jdk/src/aix/native/sun/nio/ch/AixNativeThread.c | 2 +- + jdk/src/macosx/javavm/export/jvm_md.h | 2 +- + jdk/src/solaris/javavm/export/jvm_md.h | 2 +- + jdk/src/solaris/native/sun/nio/ch/NativeThread.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/jdk/src/aix/native/sun/nio/ch/AixNativeThread.c b/jdk/src/aix/native/sun/nio/ch/AixNativeThread.c +index c0d58579..c4abb7ae 100644 +--- a/jdk/src/aix/native/sun/nio/ch/AixNativeThread.c ++++ b/jdk/src/aix/native/sun/nio/ch/AixNativeThread.c +@@ -32,7 +32,7 @@ + #include "sun_nio_ch_NativeThread.h" + + #include +-#include ++#include + + /* Also defined in src/aix/native/java/net/aix_close.c */ + #define INTERRUPT_SIGNAL (SIGRTMAX - 1) +diff --git a/jdk/src/macosx/javavm/export/jvm_md.h b/jdk/src/macosx/javavm/export/jvm_md.h +index 012bb1ba..0b575768 100644 +--- a/jdk/src/macosx/javavm/export/jvm_md.h ++++ b/jdk/src/macosx/javavm/export/jvm_md.h +@@ -60,7 +60,7 @@ + #include + #include + #include +-#include ++#include + + /* O Flags */ + +diff --git a/jdk/src/solaris/javavm/export/jvm_md.h b/jdk/src/solaris/javavm/export/jvm_md.h +index 5c681914..62415ee2 100644 +--- a/jdk/src/solaris/javavm/export/jvm_md.h ++++ b/jdk/src/solaris/javavm/export/jvm_md.h +@@ -65,7 +65,7 @@ + #include + #include + #include +-#include ++#include + + /* O Flags */ + +diff --git a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c +index 5e2a78b7..204f0441 100644 +--- a/jdk/src/solaris/native/sun/nio/ch/NativeThread.c ++++ b/jdk/src/solaris/native/sun/nio/ch/NativeThread.c +@@ -34,7 +34,7 @@ + + #ifdef __linux__ + #include +- #include ++ #include + /* Also defined in net/linux_close.c */ + #define INTERRUPT_SIGNAL (__SIGRTMAX - 2) + #elif __solaris__ +-- +2.16.2 + -- cgit v1.2.3-54-g00ecf