aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ0WI <J0WI@users.noreply.github.com>2018-06-13 04:22:54 +0200
committerJ0WI <J0WI@users.noreply.github.com>2018-06-15 00:31:21 +0200
commit3ed0ad78ac370ef880a37e1eaf3e3c1eacbee3c4 (patch)
treead0e2fd0a5067e45aa12939254e8ff32cf8ce3c8
parente567641fef9f2671442a827cb933a94058f88849 (diff)
downloadalpine_aports-3ed0ad78ac370ef880a37e1eaf3e3c1eacbee3c4.tar.bz2
alpine_aports-3ed0ad78ac370ef880a37e1eaf3e3c1eacbee3c4.tar.xz
alpine_aports-3ed0ad78ac370ef880a37e1eaf3e3c1eacbee3c4.zip
community/openjdk7: upgrade to 7.181.2.6.14
-rw-r--r--community/openjdk7/APKBUILD44
-rw-r--r--community/openjdk7/icedtea-hotspot-musl-ppc.patch140
-rw-r--r--community/openjdk7/icedtea-hotspot-musl.patch4
3 files changed, 94 insertions, 94 deletions
diff --git a/community/openjdk7/APKBUILD b/community/openjdk7/APKBUILD
index 2b86618041..b7258bf742 100644
--- a/community/openjdk7/APKBUILD
+++ b/community/openjdk7/APKBUILD
@@ -2,13 +2,13 @@
2# Contributor: Jakub Jirutka <jakub@jirutka.cz> 2# Contributor: Jakub Jirutka <jakub@jirutka.cz>
3# Maintainer: Timo Teras <timo.teras@iki.fi> 3# Maintainer: Timo Teras <timo.teras@iki.fi>
4pkgname=openjdk7 4pkgname=openjdk7
5_icedteaver=2.6.11 5_icedteaver=2.6.14
6# pkgver is <JDK version>.<JDK update> 6# pkgver is <JDK version>.<JDK update>
7# check icedtea JDK when updating 7# check icedtea JDK when updating
8pkgver=7.151.$_icedteaver 8pkgver=7.181.$_icedteaver
9pkgrel=0 9pkgrel=0
10pkgdesc="OpenJDK 7 via IcedTea" 10pkgdesc="OpenJDK 7 via IcedTea"
11url="http://icedtea.classpath.org/" 11url="https://icedtea.classpath.org/"
12arch="all" 12arch="all"
13license="GPL-2.0 with Classpath" 13license="GPL-2.0 with Classpath"
14depends="$pkgname-jre java-cacerts" 14depends="$pkgname-jre java-cacerts"
@@ -24,8 +24,8 @@ makedepends="bash findutils tar zip file paxmark gawk util-linux libxslt
24install="" 24install=""
25 25
26# upstream binary versions 26# upstream binary versions
27RHINO_VER=1.7.7.1 27RHINO_VER=1.7.7.2
28ANT_VER=1.9.7 28ANT_VER=1.9.11
29 29
30case $CARCH in 30case $CARCH in
31x86) _jarch=i386;; 31x86) _jarch=i386;;
@@ -59,9 +59,9 @@ else
59fi 59fi
60 60
61_dropsver=$_icedteaver 61_dropsver=$_icedteaver
62_dropsurl=http://icedtea.classpath.org/download/drops/icedtea7/$_dropsver 62_dropsurl=https://icedtea.classpath.org/download/drops/icedtea7/$_dropsver
63 63
64source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz 64source="https://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
65 openjdk-$_dropsver.tar.bz2::$_dropsurl/openjdk.tar.bz2 65 openjdk-$_dropsver.tar.bz2::$_dropsurl/openjdk.tar.bz2
66 corba-$_dropsver.tar.bz2::$_dropsurl/corba.tar.bz2 66 corba-$_dropsver.tar.bz2::$_dropsurl/corba.tar.bz2
67 jaxp-$_dropsver.tar.bz2::$_dropsurl/jaxp.tar.bz2 67 jaxp-$_dropsver.tar.bz2::$_dropsurl/jaxp.tar.bz2
@@ -69,8 +69,8 @@ source="http://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.gz
69 jdk-$_dropsver.tar.bz2::$_dropsurl/jdk.tar.bz2 69 jdk-$_dropsver.tar.bz2::$_dropsurl/jdk.tar.bz2
70 langtools-$_dropsver.tar.bz2::$_dropsurl/langtools.tar.bz2 70 langtools-$_dropsver.tar.bz2::$_dropsurl/langtools.tar.bz2
71 hotspot-$_dropsver.tar.bz2::$_dropsurl/hotspot.tar.bz2 71 hotspot-$_dropsver.tar.bz2::$_dropsurl/hotspot.tar.bz2
72 http://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz 72 https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VER-bin.tar.gz
73 https://github.com/mozilla/rhino/releases/download/Rhino${RHINO_VER//./_}_RELEASE/rhino-$RHINO_VER.zip 73 https://github.com/mozilla/rhino/releases/download/Rhino${RHINO_VER//./_}_Release/rhino-$RHINO_VER.zip
74 74
75 icedtea-hotspot-musl.patch 75 icedtea-hotspot-musl.patch
76 icedtea-hotspot-musl-ppc.patch 76 icedtea-hotspot-musl-ppc.patch
@@ -148,7 +148,7 @@ build() {
148 done 148 done
149 echo "icedtea patches: $DISTRIBUTION_PATCHES" 149 echo "icedtea patches: $DISTRIBUTION_PATCHES"
150 150
151 # --disable-arm32-jit: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2942 151 # --disable-arm32-jit: https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2942
152 cd "$builddir" 152 cd "$builddir"
153 ./configure \ 153 ./configure \
154 --build=$CBUILD \ 154 --build=$CBUILD \
@@ -255,18 +255,18 @@ doc() {
255 mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/ 255 mv "$pkgdir"/$INSTALL_BASE/man "$subpkgdir"/$INSTALL_BASE/
256} 256}
257 257
258sha512sums="314fa192f9de58c224b1d40a4fe4a15a7a323f3a1454d27487b126a0822ced3d4305fbc401e892530c618a394d5f22e1b64a65a844fe6b0253dc0df36497bd25 icedtea-2.6.11.tar.gz 258sha512sums="0fbcb53d1b8e3c3f5e489249d9aab63a32be25d1cace573b241ecbcae6b2788b844f889e8eb9131e629aecd6a8a7a2224161ac475e96e0b21f9a50395374322a icedtea-2.6.14.tar.gz
25995a0168b109266dfe7af97355f34888559f1978201fc7fe9c1b7b15074793d850a68ce031603bb62c4ad6790e8575ebf7e73fca2fdd8f03c9ab0a4e24e3e07b8 openjdk-2.6.11.tar.bz2 2597feb3c32ac2b08c3f5abfcc738156209dffd3f0af26b213e5afc2c13ec4547a9cdbb045d76bad9679417fbb4be059e9a688b12262236640caf9b09d5f84cab5c openjdk-2.6.14.tar.bz2
26087b374d6907dcd72043cb3a86eed08e836861c238282fdd8c9684b6653b5788f1d183038572282f92dd81381765ac41243c6faa52033173157bb8b48b928d071 corba-2.6.11.tar.bz2 2608ef1d3f4393666c84d0c927c6037f98a45db377c635611fa190b06d52bc52e1edc8f3e8caccc704d72c9d3b4a328c54b4fa5a8aa688c97f09e0850ac2e86fcc4 corba-2.6.14.tar.bz2
261a08618aca24f80f67669f62743150eaf7a33a602f9b5d806f3c0213261144a15006c4348800e25d5746500735498bc0c8380ee9adc75b6fce17283d9f4971358 jaxp-2.6.11.tar.bz2 2616417b6a400b80e46410bb5918a69461f37d0d6a7aa6de0227225ca4169b5c91beba828b6a9be7797f6d57a93243add3f878f5e3ee0f9d6fc13c12b2ae89eb4d6 jaxp-2.6.14.tar.bz2
262145ae63e81a1c2cce6e462c2b38b05d79d138a89f5f4176151e87a8dcfb27c0b8f47c826ea12d85acdd31733ea253aaf9fbb019e605a4cc24c4b66803ca01f61 jaxws-2.6.11.tar.bz2 262ebc2570c729eb0af7907347663dc86447f03a50566a9251d48f183c17da238cc0278eb370d5ff986ba2e9544b49de7230563227aa8210171ce16f1da73f180c6 jaxws-2.6.14.tar.bz2
2637974d9d7d55c4a57b53ee5e29f36ef058d207eee1701eac0e8b32b8f13a9084b08ff9fcde00cb16f4c23fa6bf371361f183b07f418cd6d200b67a67f86fa6785 jdk-2.6.11.tar.bz2 263d1a53d46582ae81daca23ce1116cc4f0dd9beef07f1e2059ed2fef8b0b6d6610ebee0a66c437e1c263626f7889910c12d688a037798deb0d241d619f78efdb86 jdk-2.6.14.tar.bz2
2646301ca17725dcf085b4dea74d453bb2ec9e7620b6791bdba6cf70fd4fac3f53679c8281db17c343ae4639a3c5431d9af09d76619825e2a8f3072bf46e09a9ce1 langtools-2.6.11.tar.bz2 264c1dd383b90bf89d770ce0afb838d6beb57edcc52d5172738be4fc11d72a08a4cce6b47bd2598ec2af36e7f752127e9f6d0bc0c20488a5224b6f77a615796feeb langtools-2.6.14.tar.bz2
2658d4bb7a97e2213d21a99261d9f9a32824830f1b178260cb170eeb45ac54414bd26042dc75b2dc719850638571cf8057d7d3fdb65c32fbed8797e6242ba257e7f hotspot-2.6.11.tar.bz2 2659a5fb4fb254e9a01199d42da8dedb121439f7970cbfda319c6085e879d3066c9bcfa780b7e497a24677333b29eec13c4e88beb4228847d3a2ad2f59a3a9c1863 hotspot-2.6.14.tar.bz2
26685d35441a3ecb1eb5c87b112ee9f3a8accbb16a1b9e249f706f0253566fcda7952f5a9cc08bd8c829b1c93d40ae452e1b1c9e29523a51a3c8a5032fa9c22e135 apache-ant-1.9.7-bin.tar.gz 2660da12cb0f761b8cb76e042449e7d93f43236e7bc948e337215470a70031f0a2dda6d1b508f9397b283808d84c4ebddb31558fe1cd8e6e6469c1dd390d69ec6e7 apache-ant-1.9.11-bin.tar.gz
267fba60e83db6e6dd7ef0a834e8aa6858af41b973e01a54392f11ed1d7d152b9641a48e5d473b434e062e8b8d5d19281da1445751e2b0e297ecd25d2680efc435a rhino-1.7.7.1.zip 2671b9e8721749e81c5420a00af1e00ee0e4f48624ccb4e9aa969032114116ad50f59b254d4d16d74feff74de64157cc8b0a2ead9b555907c84b7055b796fba9a75 rhino-1.7.7.2.zip
26832e603be6f4be91e7cb2bca4fe0c6c81e7ca8728333355d15f553d10675c65885d655dd14982d6e8ac3d82229d9688432d61db5f63852a9d4364f7b76862a35e icedtea-hotspot-musl.patch 268f62b942f0bacda8e37d0f1876d8ba14ddb4fc55a7d5fd1019463744927f40f422a85e9ee051948d566242f5a785aa28f275eb58768611283cba89af91235f43c icedtea-hotspot-musl.patch
269a6b12034217bf7adf0880a7e5697722b109793823a7db303fc1363e14d625976c4a3693a8145f9bdfbdc25180a46d64f21f3460cdc65da2dab03ddedb6bd1247 icedtea-hotspot-musl-ppc.patch 269e5cf4d70f96fc1e72ae8b97a887adb96092ff36584711cbb8de9d9fa9e859cb8731d638838de0d9591239fc44ffe5c74422d1842bd9f10a0c00dff1627bdeeef icedtea-hotspot-musl-ppc.patch
270e7a2c1771bb582d427041f8d22e48c0daf8f20d7c0926cbce3549d49c4e949359ee25a35682b486e82f3e390535c950c5beee3bd8d06fb5a717b50f2d9b2a6bc icedtea-hotspot-noagent-musl.patch 270e7a2c1771bb582d427041f8d22e48c0daf8f20d7c0926cbce3549d49c4e949359ee25a35682b486e82f3e390535c950c5beee3bd8d06fb5a717b50f2d9b2a6bc icedtea-hotspot-noagent-musl.patch
271822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch 271822eee0dc4d3ba677a289dfeb3668b536d2d626708390a9d9702fb4144a481fd443a215a0d2041c6026113837aafa4ba0b5e9ead8589d2da6717a238bbc95a5a icedtea-hotspot-uclibc-fixes.patch
272213a537de5f011cb39d608515c3413513ac75fb93593f9a9ef4205f71d72bdd8b097c80db185f7b26021d5bb85045b866f34f3478482dc4189972d8614a13458 icedtea-jdk-fix-build.patch 272213a537de5f011cb39d608515c3413513ac75fb93593f9a9ef4205f71d72bdd8b097c80db185f7b26021d5bb85045b866f34f3478482dc4189972d8614a13458 icedtea-jdk-fix-build.patch
diff --git a/community/openjdk7/icedtea-hotspot-musl-ppc.patch b/community/openjdk7/icedtea-hotspot-musl-ppc.patch
index 161abf349a..eca684884c 100644
--- a/community/openjdk7/icedtea-hotspot-musl-ppc.patch
+++ b/community/openjdk7/icedtea-hotspot-musl-ppc.patch
@@ -1,66 +1,6 @@
1--- openjdk.orig/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp
2+++ openjdk/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp
3@@ -1211,7 +1211,11 @@
4 // the safepoing polling page.
5 ucontext_t* uc = (ucontext_t*) ucontext;
6 // Set polling address.
7+#if defined(__GLIBC__) || defined(__UCLIBC__)
8 address addr = (address)uc->uc_mcontext.regs->gpr[ra] + (ssize_t)ds;
9+#else // Musl
10+ address addr = (address)uc->uc_mcontext.gp_regs[ra] + (ssize_t)ds;
11+#endif
12 if (polling_address_ptr != NULL) {
13 *polling_address_ptr = addr;
14 }
15@@ -1232,15 +1236,24 @@
16 int rb = inv_rb_field(instruction);
17
18 // look up content of ra and rb in ucontext
19+#if defined(__GLIBC__) || defined(__UCLIBC__)
20 address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
21 long rb_val=(long)uc->uc_mcontext.regs->gpr[rb];
22+#else // Musl
23+ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
24+ long rb_val=(long)uc->uc_mcontext.gp_regs[rb];
25+#endif
26 return os::is_memory_serialize_page(thread, ra_val+rb_val);
27 } else if (is_stw(instruction) || is_stwu(instruction)) {
28 int ra = inv_ra_field(instruction);
29 int d1 = inv_d1_field(instruction);
30
31 // look up content of ra in ucontext
32+#if defined(__GLIBC__) || defined(__UCLIBC__)
33 address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
34+#else // Musl
35+ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
36+#endif
37 return os::is_memory_serialize_page(thread, ra_val+d1);
38 } else {
39 return false;
40@@ -1303,11 +1316,20 @@
41 || (is_stdu(instruction) && rs == 1)) {
42 int ds = inv_ds_field(instruction);
43 // return banged address
44+#if defined(__GLIBC__) || defined(__UCLIBC__)
45 return ds+(address)uc->uc_mcontext.regs->gpr[ra];
46+#else // Musl
47+ return ds+(address)uc->uc_mcontext.gp_regs[ra];
48+#endif
49 } else if (is_stdux(instruction) && rs == 1) {
50 int rb = inv_rb_field(instruction);
51+#if defined(__GLIBC__) || defined(__UCLIBC__)
52 address sp = (address)uc->uc_mcontext.regs->gpr[1];
53 long rb_val = (long)uc->uc_mcontext.regs->gpr[rb];
54+#else // Musl
55+ address sp = (address)uc->uc_mcontext.gp_regs[1];
56+ long rb_val = (long)uc->uc_mcontext.gp_regs[rb];
57+#endif
58 return ra != 1 || rb_val >= 0 ? NULL // not a stack bang
59 : sp + rb_val; // banged address
60 }
61--- openjdk.orig/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp 1--- openjdk.orig/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
62+++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp 2+++ openjdk/hotspot/src/os_cpu/linux_ppc/vm/os_linux_ppc.cpp
63@@ -123,11 +123,19 @@ 3@@ -110,11 +110,19 @@
64 // it because the volatile registers are not needed to make setcontext() work. 4 // it because the volatile registers are not needed to make setcontext() work.
65 // Hopefully it was zero'd out beforehand. 5 // Hopefully it was zero'd out beforehand.
66 guarantee(uc->uc_mcontext.regs != NULL, "only use ucontext_get_pc in sigaction context"); 6 guarantee(uc->uc_mcontext.regs != NULL, "only use ucontext_get_pc in sigaction context");
@@ -80,7 +20,7 @@
80 } 20 }
81 21
82 intptr_t* os::Linux::ucontext_get_fp(ucontext_t * uc) { 22 intptr_t* os::Linux::ucontext_get_fp(ucontext_t * uc) {
83@@ -226,7 +234,11 @@ 23@@ -213,7 +221,11 @@
84 if (uc) { 24 if (uc) {
85 address const pc = os::Linux::ucontext_get_pc(uc); 25 address const pc = os::Linux::ucontext_get_pc(uc);
86 if (pc && StubRoutines::is_safefetch_fault(pc)) { 26 if (pc && StubRoutines::is_safefetch_fault(pc)) {
@@ -92,7 +32,7 @@
92 return true; 32 return true;
93 } 33 }
94 } 34 }
95@@ -370,7 +382,11 @@ 35@@ -364,7 +376,11 @@
96 // continue at the next instruction after the faulting read. Returning 36 // continue at the next instruction after the faulting read. Returning
97 // garbage from this read is ok. 37 // garbage from this read is ok.
98 thread->set_pending_unsafe_access_error(); 38 thread->set_pending_unsafe_access_error();
@@ -104,7 +44,7 @@
104 return true; 44 return true;
105 } 45 }
106 } 46 }
107@@ -389,7 +405,11 @@ 47@@ -383,7 +399,11 @@
108 // continue at the next instruction after the faulting read. Returning 48 // continue at the next instruction after the faulting read. Returning
109 // garbage from this read is ok. 49 // garbage from this read is ok.
110 thread->set_pending_unsafe_access_error(); 50 thread->set_pending_unsafe_access_error();
@@ -116,19 +56,19 @@
116 return true; 56 return true;
117 } 57 }
118 } 58 }
119@@ -412,7 +432,11 @@ 59@@ -406,7 +426,11 @@
120 if (stub != NULL) { 60 if (stub != NULL) {
121 // Save all thread context in case we need to restore it. 61 // Save all thread context in case we need to restore it.
122 if (thread != NULL) thread->set_saved_exception_pc(pc); 62 if (thread != NULL) thread->set_saved_exception_pc(pc);
123+#if defined(__GLIBC__) || defined(__UCLIBC__) 63+#if defined(__GLIBC__) || defined(__UCLIBC__)
124 uc->uc_mcontext.regs->nip = (unsigned long)stub; 64 uc->uc_mcontext.regs->nip = (unsigned long)stub;
125+#else // Musl 65+#else
126+ uc->uc_mcontext.gp_regs[32] = (unsigned long)stub; 66+ uc->uc_mcontext.gp_regs[32] = (unsigned long)stub;
127+#endif 67+#endif
128 return true; 68 return true;
129 } 69 }
130 70
131@@ -570,6 +594,7 @@ 71@@ -564,6 +588,7 @@
132 ucontext_t* uc = (ucontext_t*)context; 72 ucontext_t* uc = (ucontext_t*)context;
133 73
134 st->print_cr("Registers:"); 74 st->print_cr("Registers:");
@@ -136,7 +76,7 @@
136 st->print("pc =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->nip); 76 st->print("pc =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->nip);
137 st->print("lr =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->link); 77 st->print("lr =" INTPTR_FORMAT " ", uc->uc_mcontext.regs->link);
138 st->print("ctr=" INTPTR_FORMAT " ", uc->uc_mcontext.regs->ctr); 78 st->print("ctr=" INTPTR_FORMAT " ", uc->uc_mcontext.regs->ctr);
139@@ -578,8 +603,18 @@ 79@@ -572,8 +597,18 @@
140 st->print("r%-2d=" INTPTR_FORMAT " ", i, uc->uc_mcontext.regs->gpr[i]); 80 st->print("r%-2d=" INTPTR_FORMAT " ", i, uc->uc_mcontext.regs->gpr[i]);
141 if (i % 3 == 2) st->cr(); 81 if (i % 3 == 2) st->cr();
142 } 82 }
@@ -154,8 +94,8 @@
154+ st->cr(); 94+ st->cr();
155 95
156 intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc); 96 intptr_t *sp = (intptr_t *)os::Linux::ucontext_get_sp(uc);
157 st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); 97 st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", p2i(sp));
158@@ -606,7 +641,11 @@ 98@@ -600,7 +635,11 @@
159 // this is only for the "general purpose" registers 99 // this is only for the "general purpose" registers
160 for (int i = 0; i < 32; i++) { 100 for (int i = 0; i < 32; i++) {
161 st->print("r%-2d=", i); 101 st->print("r%-2d=", i);
@@ -167,3 +107,63 @@
167 } 107 }
168 st->cr(); 108 st->cr();
169 } 109 }
110--- openjdk.orig/hotspot.orig/src/cpu/ppc/vm/macroAssembler_ppc.cpp
111+++ openjdk/hotspot/src/cpu/ppc/vm/macroAssembler_ppc.cpp
112@@ -1242,7 +1242,11 @@
113 // the safepoing polling page.
114 ucontext_t* uc = (ucontext_t*) ucontext;
115 // Set polling address.
116+#if defined(__GLIBC__) || defined(__UCLIBC__)
117 address addr = (address)uc->uc_mcontext.regs->gpr[ra] + (ssize_t)ds;
118+#else // Musl
119+ address addr = (address)uc->uc_mcontext.gp_regs[ra] + (ssize_t)ds;
120+#endif
121 if (polling_address_ptr != NULL) {
122 *polling_address_ptr = addr;
123 }
124@@ -1263,15 +1267,24 @@
125 int rb = inv_rb_field(instruction);
126
127 // look up content of ra and rb in ucontext
128+#if defined(__GLIBC__) || defined(__UCLIBC__)
129 address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
130 long rb_val=(long)uc->uc_mcontext.regs->gpr[rb];
131+#else // Musl
132+ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
133+ long rb_val=(long)uc->uc_mcontext.gp_regs[rb];
134+#endif
135 return os::is_memory_serialize_page(thread, ra_val+rb_val);
136 } else if (is_stw(instruction) || is_stwu(instruction)) {
137 int ra = inv_ra_field(instruction);
138 int d1 = inv_d1_field(instruction);
139
140 // look up content of ra in ucontext
141+#if defined(__GLIBC__) || defined(__UCLIBC__)
142 address ra_val=(address)uc->uc_mcontext.regs->gpr[ra];
143+#else // Musl
144+ address ra_val=(address)uc->uc_mcontext.gp_regs[ra];
145+#endif
146 return os::is_memory_serialize_page(thread, ra_val+d1);
147 } else {
148 return false;
149@@ -1334,11 +1347,20 @@
150 || (is_stdu(instruction) && rs == 1)) {
151 int ds = inv_ds_field(instruction);
152 // return banged address
153+#if defined(__GLIBC__) || defined(__UCLIBC__)
154 return ds+(address)uc->uc_mcontext.regs->gpr[ra];
155+#else // Musl
156+ return ds+(address)uc->uc_mcontext.gp_regs[ra];
157+#endif
158 } else if (is_stdux(instruction) && rs == 1) {
159 int rb = inv_rb_field(instruction);
160+#if defined(__GLIBC__) || defined(__UCLIBC__)
161 address sp = (address)uc->uc_mcontext.regs->gpr[1];
162 long rb_val = (long)uc->uc_mcontext.regs->gpr[rb];
163+#else // Musl
164+ address sp = (address)uc->uc_mcontext.gp_regs[1];
165+ long rb_val = (long)uc->uc_mcontext.gp_regs[rb];
166+#endif
167 return ra != 1 || rb_val >= 0 ? NULL // not a stack bang
168 : sp + rb_val; // banged address
169 }
diff --git a/community/openjdk7/icedtea-hotspot-musl.patch b/community/openjdk7/icedtea-hotspot-musl.patch
index 1f980bcbcb..1da9031486 100644
--- a/community/openjdk7/icedtea-hotspot-musl.patch
+++ b/community/openjdk7/icedtea-hotspot-musl.patch
@@ -31,9 +31,9 @@
31 31
32 #ifdef AMD64 32 #ifdef AMD64
33 #define REG_SP REG_RSP 33 #define REG_SP REG_RSP
34@@ -532,6 +531,9 @@ 34@@ -533,6 +532,9 @@
35
36 ShouldNotReachHere(); 35 ShouldNotReachHere();
36 return true; // Mute compiler
37 } 37 }
38+ 38+
39+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw)) 39+#define _FPU_GETCW(cw) __asm__ __volatile__ ("fnstcw %0" : "=m" (*&cw))