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 --- ...l-0001-hotspot-stop-using-obsolete-isnanf.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch (limited to 'recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch') diff --git a/recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch b/recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch new file mode 100644 index 0000000..e165170 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/musl-0001-hotspot-stop-using-obsolete-isnanf.patch @@ -0,0 +1,42 @@ +From 1624e2dd3739fe208efa13b31abf4bc53ae2e5c1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= > +Date: Tue, 27 Feb 2018 11:24:44 +0000 +Subject: [PATCH 1/9] hotspot: stop using obsolete isnanf() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compiling against musl-libc gives the following error: +| hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp: In function 'int g_isnan(float)': +| hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:238:39: error: 'isnanf' was not declared in this scope +| inline int g_isnan(float f) { return isnanf(f); } +| ^~~~~~ + +isnanf() is obsolete, and musl doesn't implement it. isnan() +is the right thing to use for all types (float and double), +replacing isnanf(), even on glibc. + +Do so. + +Upstream-Status: Pending +Signed-off-by: André Draszik > +--- + hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +index efa0b4e1..6df2302e 100644 +--- a/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp ++++ b/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +@@ -235,7 +235,7 @@ inline int g_isnan(double f) { return isnand(f); } + #elif defined(__APPLE__) + inline int g_isnan(double f) { return isnan(f); } + #elif defined(LINUX) || defined(_ALLBSD_SOURCE) +-inline int g_isnan(float f) { return isnanf(f); } ++inline int g_isnan(float f) { return isnan(f); } + inline int g_isnan(double f) { return isnan(f); } + #else + #error "missing platform-specific definition here" +-- +2.16.2 + -- cgit v1.2.3-54-g00ecf