summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@jci.com>2018-08-14 13:50:58 +0100
committerRichard Leitner <richard.leitner@skidata.com>2018-08-14 16:41:47 +0200
commite89564dc67cf0136d998a73813c74d9e174f30af (patch)
treeb6b8b90360be488da280b06833c604858fea8c6a /recipes-core/openjdk
parentcd17a0f9389594d931d859472c18d166d4996df1 (diff)
downloadmeta-java-e89564dc67cf0136d998a73813c74d9e174f30af.tar.gz
openjdk-8: gcc-8 fix #4: undefined behaviour (hotspot)
Using gcc-8, Hotspot is being miscompiled, resulting in non- working binaries. The reason is undefined behaviour, which gcc-8 even warns about and errors out. We have so far have taped over those warnings, but it turns out that we simply cannot do that. Add patches to address undefined behaviour causing miscompilation of hotsport. This also means we can remove the -Wno-error=return-type C compiler flag again which was recently added in error in commit 52fb41cec7d5 ("openjdk-8: fix build for gcc8.x") only hiding the compiler warnings/errors that were flagging the incorrect code in the first place. With these patches applied, the openjdk-8 ARM port works again: | RESULTS: | RESULTS - ping.PingTest.test_ping - Testcase 964: PASSED (0.04s) | RESULTS - ssh.SSHTest.test_ssh - Testcase 224: PASSED (0.68s) | RESULTS - java.JavaTest.test_java_exists - Testcase -1: PASSED (0.14s) | RESULTS - java.JavaTest.test_java_jar_comp_mode - Testcase -1: FAILED (5.13s) | RESULTS - java.JavaTest.test_java_jar_int_mode - Testcase -1: PASSED (4.48s) | RESULTS - java.JavaTest.test_java_jar_works - Testcase -1: PASSED (4.44s) | RESULTS - java.JavaTest.test_java_version - Testcase -1: PASSED (3.66s) | RESULTS - javac.JavacTest.test_javac_exists - Testcase -1: PASSED (0.13s) | RESULTS - javac.JavacTest.test_javac_works - Testcase -1: PASSED (30.87s) | SUMMARY: | openjdk-8-test-image () - Ran 9 tests in 50.263s The java.JavaTest.test_java_jar_comp_mode failure can be ignored for now, as that test verifies compiled mode which is not available on arm. The testcase must be fixed instead. (We need to refresh one unrelated existing patch to avoid patch fuzz warnings) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk')
-rw-r--r--recipes-core/openjdk/openjdk-8-common.inc2
-rw-r--r--recipes-core/openjdk/openjdk-8-release-172b11-common.inc13
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0012-hotspot-aarch64-fix-undefined-behaviour-gcc-v8-fix.patch41
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0013-hotspot-aarch64-Fix-further-functions-with-a-missing.patch38
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch42
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch56
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0016-hotspot-Zero-build-requires-disabled-warnings.patch148
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0017-hotspot-Missing-return-statement-in-__sync_val_compa.patch53
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch47
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0019-hotspot-Turn-on-the-Wreturn-type-warning.patch233
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/musl-0007-hotspot-os_linux_x86-remove-glibc-dependencies-fpu_c.patch2
11 files changed, 673 insertions, 2 deletions
diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 1c33a3b..7348657 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -217,7 +217,7 @@ EXTRA_OECONF_append = "\
217# of these changes. 217# of these changes.
218FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks" 218FLAGS_GCC6 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
219FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks" 219FLAGS_GCC7 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
220FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks -Wno-error=return-type" 220FLAGS_GCC8 = "-fno-lifetime-dse -fno-delete-null-pointer-checks"
221 221
222# flags for -native, and for bits that need a host-tool during -cross 222# flags for -native, and for bits that need a host-tool during -cross
223BUILD_CFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}" 223BUILD_CFLAGS_append = " ${@openjdk_build_helper_get_build_cflags(d)}"
diff --git a/recipes-core/openjdk/openjdk-8-release-172b11-common.inc b/recipes-core/openjdk/openjdk-8-release-172b11-common.inc
index 8b30c37..4bcecef 100644
--- a/recipes-core/openjdk/openjdk-8-release-172b11-common.inc
+++ b/recipes-core/openjdk/openjdk-8-release-172b11-common.inc
@@ -17,6 +17,19 @@ PATCHES_URI = "\
17 file://0009-jdk-disable-backtrace-musl-build-fix.patch \ 17 file://0009-jdk-disable-backtrace-musl-build-fix.patch \
18 file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \ 18 file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
19 file://0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch \ 19 file://0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch \
20 ${HOTSPOT_UB_PATCH} \
21"
22HOTSPOT_UB_PATCH = "\
23 file://0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch \
24 file://0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch \
25 file://0016-hotspot-Zero-build-requires-disabled-warnings.patch \
26 file://0017-hotspot-Missing-return-statement-in-__sync_val_compa.patch \
27 file://0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch \
28 file://0019-hotspot-Turn-on-the-Wreturn-type-warning.patch \
29"
30HOTSPOT_UB_PATCH_prepend_aarch64 = "\
31 file://0012-hotspot-aarch64-fix-undefined-behaviour-gcc-v8-fix.patch \
32 file://0013-hotspot-aarch64-Fix-further-functions-with-a-missing.patch \
20" 33"
21# some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch 34# some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
22# reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html 35# reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
diff --git a/recipes-core/openjdk/patches-openjdk-8/0012-hotspot-aarch64-fix-undefined-behaviour-gcc-v8-fix.patch b/recipes-core/openjdk/patches-openjdk-8/0012-hotspot-aarch64-fix-undefined-behaviour-gcc-v8-fix.patch
new file mode 100644
index 0000000..e11c19c
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0012-hotspot-aarch64-fix-undefined-behaviour-gcc-v8-fix.patch
@@ -0,0 +1,41 @@
1From 1fa1097d45afa2fe2bfd989fbd90578f5c5fc540 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 12:14:21 +0100
4Subject: [PATCH] hotspot/aarch64: fix undefined behaviour (gcc v8 fix)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Backport patch from
10 http://hg.openjdk.java.net/aarch64-port/jdk8u/hotspot/rev/253b0c304db6
11to address segfaults due to undefined behaviour.
12
13|# HG changeset patch
14|# User shade
15|# Date 1526068247 -7200
16|# Node ID 253b0c304db6d31be3d3d7cf7cf1b3561a16dc3a
17|# Parent 1ced2ae00e35e6f855175fc44500b37fbac9e314
18UB in os_linux_aarch64.cpp SpinPause
19Reviewed-by: aph, shade, adinn
20
21Signed-off-by: André Draszik <andre.draszik@jci.com>
22Upstream-Status: Backport [http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916]
23---
24 hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp | 1 +
25 1 file changed, 1 insertion(+)
26
27diff --git a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
28index 8b985693..f536817e 100644
29--- a/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
30+++ b/hotspot/src/os_cpu/linux_aarch64/vm/os_linux_aarch64.cpp
31@@ -699,6 +699,7 @@ void os::verify_stack_alignment() {
32
33 extern "C" {
34 int SpinPause() {
35+ return 0;
36 }
37
38 void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) {
39--
402.18.0
41
diff --git a/recipes-core/openjdk/patches-openjdk-8/0013-hotspot-aarch64-Fix-further-functions-with-a-missing.patch b/recipes-core/openjdk/patches-openjdk-8/0013-hotspot-aarch64-Fix-further-functions-with-a-missing.patch
new file mode 100644
index 0000000..0216c68
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0013-hotspot-aarch64-Fix-further-functions-with-a-missing.patch
@@ -0,0 +1,38 @@
1From 3dffe06da016a959f1d8c3afc292ab92a9d4d137 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 17:03:56 +0100
4Subject: [PATCH] hotspot/aarch64: Fix further functions with a missing return
5 value.
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10|# HG changeset patch
11|# User andrew
12|# Date 1518669922 0
13|# Thu Feb 15 04:45:22 2018 +0000
14|# Node ID adaf109718c10888cce5b6e73af7f3e15a7ab0db
15|# Parent 3ade0115344b77e6d00462044e0cf68722685bfe
16PR3519: Fix further functions with a missing return value.
17
18Signed-off-by: André Draszik <andre.draszik@jci.com>
19Upstream-Status: Backport
20---
21 hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
25index 4e98cb39..bbc81b4a 100644
26--- a/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
27+++ b/hotspot/src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp
28@@ -205,6 +205,7 @@ Address LIR_Assembler::as_Address(LIR_Address* addr, Register tmp) {
29 return Address(base, tmp, Address::lsl(addr->scale()));
30 }
31 }
32+ return Address();
33 }
34
35 Address LIR_Assembler::as_Address_hi(LIR_Address* addr) {
36--
372.18.0
38
diff --git a/recipes-core/openjdk/patches-openjdk-8/0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch b/recipes-core/openjdk/patches-openjdk-8/0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch
new file mode 100644
index 0000000..467a1cd
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch
@@ -0,0 +1,42 @@
1From 3bd88f93a90876f8ead05de40816da0bd1e39aac Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 11:49:26 +0100
4Subject: [PATCH] hotspot/zero: fix undefined behaviour (gcc v8 fix)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Backport patch from
10 https://bugs.openjdk.java.net/browse/JDK-8202600
11 http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916
12to address segfaults due to undefined behaviour.
13
14|# HG changeset patch
15|# User sgehwolf
16|# Date 1525366788 -7200
17|# Node ID ca4663e589160509d6aef8ec890815e1330b97bc
18|# Parent a27880c1288ba776f65748b68c198df97427f950
198202600: [Zero] Undefined behaviour in src/os_cpu/linux_zero/vm/os_linux_zero.cpp
20Reviewed-by: stuefe, shade, dholmes
21
22Signed-off-by: André Draszik <andre.draszik@jci.com>
23Upstream-Status: Backport [http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916]
24---
25 hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp | 1 +
26 1 file changed, 1 insertion(+)
27
28diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
29index 1d069c6d..8dcf9d44 100644
30--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
31+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
32@@ -408,6 +408,7 @@ void os::print_register_info(outputStream *st, void *context) {
33
34 extern "C" {
35 int SpinPause() {
36+ return 0; // Shouldn't matter.
37 }
38
39
40--
412.18.0
42
diff --git a/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch b/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch
new file mode 100644
index 0000000..fb7bb59
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0015-hotspot-fix-Wreturn-type-issues-introduced-by-806165.patch
@@ -0,0 +1,56 @@
1From f6424c46b4af08d0662eec1a5897d5502270a3b1 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:40:34 +0100
4Subject: [PATCH 1/5] hotspot: fix -Wreturn-type issues introduced by 8061651
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9|# HG changeset patch
10|# User andrew
11|# Date 1529475043 -3600
12|# Wed Jun 20 07:10:43 2018 +0100
13|# Node ID f6341f4635dacb56678264d29a88cd052b74036b
14|# Parent 30520d5018b509b0ae68f5fcc9a5c540e3e5b2de
15PR3601: Fix additional -Wreturn-type issues introduced by 8061651
16
17Signed-off-by: André Draszik <andre.draszik@jci.com>
18Upstream-Status: Backport
19---
20 hotspot/src/share/vm/prims/jvm.cpp | 6 +++---
21 1 file changed, 3 insertions(+), 3 deletions(-)
22
23diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
24index 07c36de8..067fd3ac 100644
25--- a/hotspot/src/share/vm/prims/jvm.cpp
26+++ b/hotspot/src/share/vm/prims/jvm.cpp
27@@ -835,7 +835,7 @@ JVM_END
28 JVM_ENTRY(jboolean, JVM_KnownToNotExist(JNIEnv *env, jobject loader, const char *classname))
29 JVMWrapper("JVM_KnownToNotExist");
30 #if INCLUDE_CDS
31- return ClassLoaderExt::known_to_not_exist(env, loader, classname, CHECK_(false));
32+ return ClassLoaderExt::known_to_not_exist(env, loader, classname, THREAD);
33 #else
34 return false;
35 #endif
36@@ -845,7 +845,7 @@ JVM_END
37 JVM_ENTRY(jobjectArray, JVM_GetResourceLookupCacheURLs(JNIEnv *env, jobject loader))
38 JVMWrapper("JVM_GetResourceLookupCacheURLs");
39 #if INCLUDE_CDS
40- return ClassLoaderExt::get_lookup_cache_urls(env, loader, CHECK_NULL);
41+ return ClassLoaderExt::get_lookup_cache_urls(env, loader, THREAD);
42 #else
43 return NULL;
44 #endif
45@@ -855,7 +855,7 @@ JVM_END
46 JVM_ENTRY(jintArray, JVM_GetResourceLookupCache(JNIEnv *env, jobject loader, const char *resource_name))
47 JVMWrapper("JVM_GetResourceLookupCache");
48 #if INCLUDE_CDS
49- return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, CHECK_NULL);
50+ return ClassLoaderExt::get_lookup_cache(env, loader, resource_name, THREAD);
51 #else
52 return NULL;
53 #endif
54--
552.18.0
56
diff --git a/recipes-core/openjdk/patches-openjdk-8/0016-hotspot-Zero-build-requires-disabled-warnings.patch b/recipes-core/openjdk/patches-openjdk-8/0016-hotspot-Zero-build-requires-disabled-warnings.patch
new file mode 100644
index 0000000..d6bedbc
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0016-hotspot-Zero-build-requires-disabled-warnings.patch
@@ -0,0 +1,148 @@
1From 43c1f744e5f6171df3158baf88dd0a64c4b5e439 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:45:24 +0100
4Subject: [PATCH 2/5] hotspot: Zero build requires disabled warnings
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9|# HG changeset patch
10|# User sgehwolf
11|# Date 1525714161 -3600
12|# Mon May 07 18:29:21 2018 +0100
13|# Node ID afb31413c73cbc06420fdb447aa90a7a38258904
14|# Parent bcbc64dfb629c5f188bbf59b8f986ad95963ed60
158143245, PR3548: Zero build requires disabled warnings
16Reviewed-by: dholmes, coleenp
17
18Signed-off-by: André Draszik <andre.draszik@jci.com>
19Upstream-Status: Backport
20---
21 hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp | 2 +-
22 hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp | 4 ++--
23 .../src/os_cpu/linux_zero/vm/os_linux_zero.cpp | 16 +++++++++++++---
24 .../os_cpu/linux_zero/vm/thread_linux_zero.hpp | 3 ++-
25 4 files changed, 18 insertions(+), 7 deletions(-)
26
27diff --git a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
28index 242ce1cf..065471af 100644
29--- a/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
30+++ b/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp
31@@ -100,7 +100,7 @@ intptr_t narrow(BasicType type, intptr_t result) {
32 case T_DOUBLE:
33 case T_VOID:
34 return result;
35- default : ShouldNotReachHere();
36+ default : ShouldNotReachHere(); return NULL_WORD;
37 }
38 }
39
40diff --git a/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp b/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
41index e23e3eaa..061ed8ce 100644
42--- a/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
43+++ b/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp
44@@ -1,5 +1,5 @@
45 /*
46- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
47+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
48 * Copyright 2007, 2008, 2010 Red Hat, Inc.
49 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
50 *
51@@ -62,7 +62,7 @@ void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_object() {
52 }
53
54 void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) {
55- ffi_type *ftype;
56+ ffi_type *ftype = NULL;
57 switch (type) {
58 case T_VOID:
59 ftype = &ffi_type_void;
60diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
61index 8dcf9d44..508eb172 100644
62--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
63+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
64@@ -1,6 +1,6 @@
65 /*
66 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
67- * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
68+ * Copyright 2016 Red Hat, Inc.
69 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
70 *
71 * This code is free software; you can redistribute it and/or modify it
72@@ -61,6 +61,7 @@ address os::current_stack_pointer() {
73
74 frame os::get_sender_for_C_frame(frame* fr) {
75 ShouldNotCallThis();
76+ return frame(NULL, NULL); // silence compile warning.
77 }
78
79 frame os::current_frame() {
80@@ -98,16 +99,19 @@ void os::initialize_thread(Thread * thr){
81
82 address os::Linux::ucontext_get_pc(ucontext_t* uc) {
83 ShouldNotCallThis();
84+ return NULL; // silence compile warnings
85 }
86
87 ExtendedPC os::fetch_frame_from_context(void* ucVoid,
88 intptr_t** ret_sp,
89 intptr_t** ret_fp) {
90 ShouldNotCallThis();
91+ return NULL; // silence compile warnings
92 }
93
94 frame os::fetch_frame_from_context(void* ucVoid) {
95 ShouldNotCallThis();
96+ return frame(NULL, NULL); // silence compile warnings
97 }
98
99 extern "C" JNIEXPORT int
100@@ -247,11 +251,16 @@ JVM_handle_linux_signal(int sig,
101 }
102 #endif // !PRODUCT
103
104- const char *fmt = "caught unhandled signal %d";
105 char buf[64];
106
107- sprintf(buf, fmt, sig);
108+ sprintf(buf, "caught unhandled signal %d", sig);
109+
110+// Silence -Wformat-security warning for fatal()
111+PRAGMA_DIAG_PUSH
112+PRAGMA_FORMAT_NONLITERAL_IGNORED
113 fatal(buf);
114+PRAGMA_DIAG_POP
115+ return true; // silence compiler warnings
116 }
117
118 void os::Linux::init_thread_fpu_state(void) {
119@@ -260,6 +269,7 @@ void os::Linux::init_thread_fpu_state(void) {
120
121 int os::Linux::get_fpu_control_word() {
122 ShouldNotCallThis();
123+ return -1; // silence compile warnings
124 }
125
126 void os::Linux::set_fpu_control_word(int fpu) {
127diff --git a/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp b/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
128index 39f77f85..b9c73dc4 100644
129--- a/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
130+++ b/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp
131@@ -1,5 +1,5 @@
132 /*
133- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
134+ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
135 * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
136 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
137 *
138@@ -110,6 +110,7 @@
139 void* ucontext,
140 bool isInJava) {
141 ShouldNotCallThis();
142+ return false; // silence compile warning
143 }
144
145 // These routines are only used on cpu architectures that
146--
1472.18.0
148
diff --git a/recipes-core/openjdk/patches-openjdk-8/0017-hotspot-Missing-return-statement-in-__sync_val_compa.patch b/recipes-core/openjdk/patches-openjdk-8/0017-hotspot-Missing-return-statement-in-__sync_val_compa.patch
new file mode 100644
index 0000000..001e905
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0017-hotspot-Missing-return-statement-in-__sync_val_compa.patch
@@ -0,0 +1,53 @@
1From 6e1d92639787ac8f506f810776a3f1c35f2cd070 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:46:33 +0100
4Subject: [PATCH 3/5] hotspot: Missing return statement in
5 __sync_val_compare_and_swap_8
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10|# HG changeset patch
11|# User andrew
12|# Date 1518667645 0
13|# Thu Feb 15 04:07:25 2018 +0000
14|# Node ID 1d35411eb7bdf16191e220ffe3b1dc4d5d0c6041
15|# Parent 999983606f5c61b093c6f6316a7b26c4cd4ca79e
168197981, PR3548: Missing return statement in __sync_val_compare_and_swap_8
17Summary: Fix issue discovered by -Wreturn-type on systems without LP64.
18Reviewed-by: aph
19
20Signed-off-by: André Draszik <andre.draszik@jci.com>
21Upstream-Status: Backport
22---
23 hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp | 1 +
24 hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp | 1 +
25 2 files changed, 2 insertions(+)
26
27diff --git a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
28index c857b552..4aaf78b1 100644
29--- a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
30+++ b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
31@@ -457,6 +457,7 @@ extern "C" {
32 long long unsigned int oldval,
33 long long unsigned int newval) {
34 ShouldNotCallThis();
35+ return 0;
36 }
37 };
38 #endif // !_LP64
39diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
40index 508eb172..bb8fa1f1 100644
41--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
42+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
43@@ -498,6 +498,7 @@ extern "C" {
44 long long unsigned int oldval,
45 long long unsigned int newval) {
46 ShouldNotCallThis();
47+ return 0;
48 }
49 };
50 #endif // !_LP64
51--
522.18.0
53
diff --git a/recipes-core/openjdk/patches-openjdk-8/0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch b/recipes-core/openjdk/patches-openjdk-8/0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch
new file mode 100644
index 0000000..1421963
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch
@@ -0,0 +1,47 @@
1From dbf31e2dfd00e20ab49af70f3533a348e8a6515e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:47:25 +0100
4Subject: [PATCH 4/5] hotspot: Fix debug build after 8062808: Turn on the
5 -Wreturn-type warning
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10|# HG changeset patch
11|# User goetz
12|# Date 1415873641 -3600
13|# Thu Nov 13 11:14:01 2014 +0100
14|# Node ID 1878c4c1d04e1f3c6f67a19d36c35863d6b5f906
15|# Parent 533473c67de6ff767710594639033c8e83523fe5
168064786, PR3599: Fix debug build after 8062808: Turn on the -Wreturn-type warning
17Reviewed-by: stefank, tschatzl
18
19Signed-off-by: André Draszik <andre.draszik@jci.com>
20Upstream-Status: Backport
21---
22 hotspot/src/share/vm/prims/jni.cpp | 2 ++
23 1 file changed, 2 insertions(+)
24
25diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
26index 6a6ab936..e2f2ad3b 100644
27--- a/hotspot/src/share/vm/prims/jni.cpp
28+++ b/hotspot/src/share/vm/prims/jni.cpp
29@@ -708,6 +708,7 @@ JNI_ENTRY(jint, jni_Throw(JNIEnv *env, jthrowable obj))
30
31 THROW_OOP_(JNIHandles::resolve(obj), JNI_OK);
32 ShouldNotReachHere();
33+ return 0; // Mute compiler.
34 JNI_END
35
36 #ifndef USDT2
37@@ -734,6 +735,7 @@ JNI_ENTRY(jint, jni_ThrowNew(JNIEnv *env, jclass clazz, const char *message))
38 Handle protection_domain (THREAD, k->protection_domain());
39 THROW_MSG_LOADER_(name, (char *)message, class_loader, protection_domain, JNI_OK);
40 ShouldNotReachHere();
41+ return 0; // Mute compiler.
42 JNI_END
43
44
45--
462.18.0
47
diff --git a/recipes-core/openjdk/patches-openjdk-8/0019-hotspot-Turn-on-the-Wreturn-type-warning.patch b/recipes-core/openjdk/patches-openjdk-8/0019-hotspot-Turn-on-the-Wreturn-type-warning.patch
new file mode 100644
index 0000000..0156978
--- /dev/null
+++ b/recipes-core/openjdk/patches-openjdk-8/0019-hotspot-Turn-on-the-Wreturn-type-warning.patch
@@ -0,0 +1,233 @@
1From cc0d371f17c0ab060eb1e6b42d4bf053a2cbc3ba Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Mon, 13 Aug 2018 16:48:32 +0100
4Subject: [PATCH 5/5] hotspot: Turn on the -Wreturn-type warning
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9|# HG changeset patch
10|# User stefank
11|# Date 1525453613 -3600
12|# Fri May 04 18:06:53 2018 +0100
13|# Node ID 07a1135a327362f157955d470fad5df07cc35164
14|# Parent de79964656fc652f2085dac4fe99bcc128b5a3b1
158062808, PR3548: Turn on the -Wreturn-type warning
16Reviewed-by: mgerdin, tschatzl, coleenp, jrose, kbarrett
17
18Signed-off-by: André Draszik <andre.draszik@jci.com>
19Upstream-Status: Backport
20---
21 hotspot/make/linux/makefiles/gcc.make | 2 +-
22 hotspot/src/cpu/x86/vm/x86_32.ad | 1 +
23 hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp | 1 +
24 hotspot/src/share/vm/classfile/defaultMethods.cpp | 4 ++--
25 hotspot/src/share/vm/classfile/symbolTable.cpp | 4 ++--
26 hotspot/src/share/vm/classfile/systemDictionary.cpp | 6 +++---
27 hotspot/src/share/vm/memory/heapInspection.hpp | 2 +-
28 hotspot/src/share/vm/memory/metaspaceShared.hpp | 2 +-
29 hotspot/src/share/vm/oops/constantPool.hpp | 2 +-
30 hotspot/src/share/vm/prims/jvm.cpp | 2 +-
31 hotspot/src/share/vm/runtime/reflection.cpp | 2 +-
32 hotspot/src/share/vm/runtime/sharedRuntime.cpp | 2 +-
33 hotspot/src/share/vm/services/memTracker.hpp | 2 +-
34 13 files changed, 17 insertions(+), 15 deletions(-)
35
36diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make
37index 272afcea..157afff2 100644
38--- a/hotspot/make/linux/makefiles/gcc.make
39+++ b/hotspot/make/linux/makefiles/gcc.make
40@@ -207,7 +207,7 @@ ifeq ($(USE_CLANG), true)
41 WARNINGS_ARE_ERRORS += -Wno-return-type -Wno-empty-body
42 endif
43
44-WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value
45+WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wunused-value -Wreturn-type
46
47 ifeq ($(USE_CLANG),)
48 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
49diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad
50index f42d1a28..c8f4ee16 100644
51--- a/hotspot/src/cpu/x86/vm/x86_32.ad
52+++ b/hotspot/src/cpu/x86/vm/x86_32.ad
53@@ -1250,6 +1250,7 @@ uint MachSpillCopyNode::implementation( CodeBuffer *cbuf, PhaseRegAlloc *ra_, bo
54
55
56 Unimplemented();
57+ return 0; // Mute compiler
58 }
59
60 #ifndef PRODUCT
61diff --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
62index fb96738a..4cdeb372 100644
63--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
64+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
65@@ -541,6 +541,7 @@ JVM_handle_linux_signal(int sig,
66 err.report_and_die();
67
68 ShouldNotReachHere();
69+ return true; // Mute compiler
70 }
71
72 void os::Linux::init_thread_fpu_state(void) {
73diff --git a/hotspot/src/share/vm/classfile/defaultMethods.cpp b/hotspot/src/share/vm/classfile/defaultMethods.cpp
74index 0e3d5d7b..d3df1d15 100644
75--- a/hotspot/src/share/vm/classfile/defaultMethods.cpp
76+++ b/hotspot/src/share/vm/classfile/defaultMethods.cpp
77@@ -506,7 +506,7 @@ Symbol* MethodFamily::generate_method_message(Symbol *klass_name, Method* method
78 ss.write((const char*)name->bytes(), name->utf8_length());
79 ss.write((const char*)signature->bytes(), signature->utf8_length());
80 ss.print(" is abstract");
81- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
82+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
83 }
84
85 Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods, TRAPS) const {
86@@ -521,7 +521,7 @@ Symbol* MethodFamily::generate_conflicts_message(GrowableArray<Method*>* methods
87 ss.print(".");
88 ss.write((const char*)name->bytes(), name->utf8_length());
89 }
90- return SymbolTable::new_symbol(ss.base(), (int)ss.size(), CHECK_NULL);
91+ return SymbolTable::new_symbol(ss.base(), (int)ss.size(), THREAD);
92 }
93
94
95diff --git a/hotspot/src/share/vm/classfile/symbolTable.cpp b/hotspot/src/share/vm/classfile/symbolTable.cpp
96index ec97077b..2621a7d6 100644
97--- a/hotspot/src/share/vm/classfile/symbolTable.cpp
98+++ b/hotspot/src/share/vm/classfile/symbolTable.cpp
99@@ -249,7 +249,7 @@ Symbol* SymbolTable::lookup(const char* name, int len, TRAPS) {
100 MutexLocker ml(SymbolTable_lock, THREAD);
101
102 // Otherwise, add to symbol to table
103- return the_table()->basic_add(index, (u1*)name, len, hashValue, true, CHECK_NULL);
104+ return the_table()->basic_add(index, (u1*)name, len, hashValue, true, THREAD);
105 }
106
107 Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
108@@ -288,7 +288,7 @@ Symbol* SymbolTable::lookup(const Symbol* sym, int begin, int end, TRAPS) {
109 // Grab SymbolTable_lock first.
110 MutexLocker ml(SymbolTable_lock, THREAD);
111
112- return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, CHECK_NULL);
113+ return the_table()->basic_add(index, (u1*)buffer, len, hashValue, true, THREAD);
114 }
115
116 Symbol* SymbolTable::lookup_only(const char* name, int len,
117diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
118index 8d2e7f49..62bdba3e 100644
119--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
120+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
121@@ -229,15 +229,15 @@ Klass* SystemDictionary::resolve_or_null(Symbol* class_name, Handle class_loader
122 class_name->as_C_string(),
123 class_loader.is_null() ? "null" : class_loader->klass()->name()->as_C_string()));
124 if (FieldType::is_array(class_name)) {
125- return resolve_array_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
126+ return resolve_array_class_or_null(class_name, class_loader, protection_domain, THREAD);
127 } else if (FieldType::is_obj(class_name)) {
128 ResourceMark rm(THREAD);
129 // Ignore wrapping L and ;.
130 TempNewSymbol name = SymbolTable::new_symbol(class_name->as_C_string() + 1,
131 class_name->utf8_length() - 2, CHECK_NULL);
132- return resolve_instance_class_or_null(name, class_loader, protection_domain, CHECK_NULL);
133+ return resolve_instance_class_or_null(name, class_loader, protection_domain, THREAD);
134 } else {
135- return resolve_instance_class_or_null(class_name, class_loader, protection_domain, CHECK_NULL);
136+ return resolve_instance_class_or_null(class_name, class_loader, protection_domain, THREAD);
137 }
138 }
139
140diff --git a/hotspot/src/share/vm/memory/heapInspection.hpp b/hotspot/src/share/vm/memory/heapInspection.hpp
141index 09ee6602..c5fec15c 100644
142--- a/hotspot/src/share/vm/memory/heapInspection.hpp
143+++ b/hotspot/src/share/vm/memory/heapInspection.hpp
144@@ -367,7 +367,7 @@ class HeapInspection : public StackObj {
145 _csv_format(csv_format), _print_help(print_help),
146 _print_class_stats(print_class_stats), _columns(columns) {}
147 void heap_inspection(outputStream* st) NOT_SERVICES_RETURN;
148- size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN;
149+ size_t populate_table(KlassInfoTable* cit, BoolObjectClosure* filter = NULL) NOT_SERVICES_RETURN_(0);
150 static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
151 private:
152 void iterate_over_heap(KlassInfoTable* cit, BoolObjectClosure* filter = NULL);
153diff --git a/hotspot/src/share/vm/memory/metaspaceShared.hpp b/hotspot/src/share/vm/memory/metaspaceShared.hpp
154index 2f3abae6..d58ebecb 100644
155--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp
156+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp
157@@ -93,7 +93,7 @@ class MetaspaceShared : AllStatic {
158 static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
159 static int preload_and_dump(const char * class_list_path,
160 GrowableArray<Klass*>* class_promote_order,
161- TRAPS) NOT_CDS_RETURN;
162+ TRAPS) NOT_CDS_RETURN_(0);
163
164 static ReservedSpace* shared_rs() {
165 CDS_ONLY(return _shared_rs);
166diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp
167index f170decc..a1e168b2 100644
168--- a/hotspot/src/share/vm/oops/constantPool.hpp
169+++ b/hotspot/src/share/vm/oops/constantPool.hpp
170@@ -349,7 +349,7 @@ class ConstantPool : public Metadata {
171
172 Klass* klass_at(int which, TRAPS) {
173 constantPoolHandle h_this(THREAD, this);
174- return klass_at_impl(h_this, which, CHECK_NULL);
175+ return klass_at_impl(h_this, which, THREAD);
176 }
177
178 Symbol* klass_name_at(int which); // Returns the name, w/o resolving.
179diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
180index 067fd3ac..b9e5b322 100644
181--- a/hotspot/src/share/vm/prims/jvm.cpp
182+++ b/hotspot/src/share/vm/prims/jvm.cpp
183@@ -4280,7 +4280,7 @@ JVM_ENTRY(jlong,JVM_DTraceActivate(
184 JVM_DTraceProvider* providers))
185 JVMWrapper("JVM_DTraceActivate");
186 return DTraceJSDT::activate(
187- version, module_name, providers_count, providers, CHECK_0);
188+ version, module_name, providers_count, providers, THREAD);
189 JVM_END
190
191 JVM_ENTRY(jboolean,JVM_DTraceIsProbeEnabled(JNIEnv* env, jmethodID method))
192diff --git a/hotspot/src/share/vm/runtime/reflection.cpp b/hotspot/src/share/vm/runtime/reflection.cpp
193index e2f282ee..679e1775 100644
194--- a/hotspot/src/share/vm/runtime/reflection.cpp
195+++ b/hotspot/src/share/vm/runtime/reflection.cpp
196@@ -1093,7 +1093,7 @@ oop Reflection::invoke(instanceKlassHandle klass, methodHandle reflected_method,
197 } else {
198 if (rtype == T_BOOLEAN || rtype == T_BYTE || rtype == T_CHAR || rtype == T_SHORT)
199 narrow((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
200- return box((jvalue*) result.get_value_addr(), rtype, CHECK_NULL);
201+ return box((jvalue*) result.get_value_addr(), rtype, THREAD);
202 }
203 }
204
205diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
206index 8ffa8ab3..219bcd5c 100644
207--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
208+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
209@@ -1038,7 +1038,7 @@ Handle SharedRuntime::find_callee_info(JavaThread* thread, Bytecodes::Code& bc,
210 // last java frame on stack (which includes native call frames)
211 vframeStream vfst(thread, true); // Do not skip and javaCalls
212
213- return find_callee_info_helper(thread, vfst, bc, callinfo, CHECK_(Handle()));
214+ return find_callee_info_helper(thread, vfst, bc, callinfo, THREAD);
215 }
216
217
218diff --git a/hotspot/src/share/vm/services/memTracker.hpp b/hotspot/src/share/vm/services/memTracker.hpp
219index 38a027ea..13436a4b 100644
220--- a/hotspot/src/share/vm/services/memTracker.hpp
221+++ b/hotspot/src/share/vm/services/memTracker.hpp
222@@ -64,7 +64,7 @@ class MemTracker : AllStatic {
223 const NativeCallStack& stack, MEMFLAGS flag = mtNone) { }
224 static inline void record_virtual_memory_commit(void* addr, size_t size, const NativeCallStack& stack) { }
225 static inline Tracker get_virtual_memory_uncommit_tracker() { return Tracker(); }
226- static inline Tracker get_virtual_memory_release_tracker() { }
227+ static inline Tracker get_virtual_memory_release_tracker() { return Tracker(); }
228 static inline void record_virtual_memory_type(void* addr, MEMFLAGS flag) { }
229 static inline void record_thread_stack(void* addr, size_t size) { }
230 static inline void release_thread_stack(void* addr, size_t size) { }
231--
2322.18.0
233
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
index fcad102..7dcb889 100644
--- 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
@@ -32,7 +32,7 @@ index fb96738a..982ce84d 100644
32 #ifdef AMD64 32 #ifdef AMD64
33 #define REG_SP REG_RSP 33 #define REG_SP REG_RSP
34@@ -543,6 +542,9 @@ JVM_handle_linux_signal(int sig, 34@@ -543,6 +542,9 @@ JVM_handle_linux_signal(int sig,
35 ShouldNotReachHere(); 35 return true; // Mute compiler
36 } 36 }
37 37
38+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) 38+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))