diff options
author | Simon Frankenberger <simon@fraho.eu> | 2020-11-10 19:54:21 +0100 |
---|---|---|
committer | Milan P. Stanić <mps@arvanta.net> | 2020-12-04 08:04:19 +0000 |
commit | 7ca4bf63c9c3b7df4654e63347c9845178909278 (patch) | |
tree | 18826f0e1f732441e80d0c0a9db70854dc188c61 /testing/openjdk15/ppc64le.patch | |
parent | 0b8ae1f26d4830980ac497e2ddb03a628fefc546 (diff) |
community/openjdk15: unify patches
Diffstat (limited to 'testing/openjdk15/ppc64le.patch')
-rw-r--r-- | testing/openjdk15/ppc64le.patch | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/testing/openjdk15/ppc64le.patch b/testing/openjdk15/ppc64le.patch index 32f637695d4..50b849a5142 100644 --- a/testing/openjdk15/ppc64le.patch +++ b/testing/openjdk15/ppc64le.patch @@ -1,5 +1,11 @@ -The ucontext_t-Type is somewhat different with musl libc. -Add some precompiler conditions to use the right fields from the struct. +Subject: Fix compilation with different ucontext_t on musl +Upstream: No +Author: Simon Frankenberger <simon-alpine@fraho.eu> + +The machine state registers have to be accessed differently when +running on musl libc. This patch fix this by replacing +"uc_mcontext.regs->grp" with "uc_mcontext.gp_regs" +and accessing the named fields (like "->nip") by the array index constants. --- old/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp +++ new/src/hotspot/cpu/ppc/macroAssembler_ppc.cpp @@ -230,7 +236,7 @@ Add some precompiler conditions to use the right fields from the struct. @@ -70,7 +79,11 @@ if (!Method::is_valid_method(m)) return false; if (!Metaspace::contains(m->constMethod())) return false; - + +#if defined(__GLIBC__) || defined(__UCLIBC__) uint64_t reg_bcp = uc->uc_mcontext.regs->gpr[14/*R14_bcp*/]; +#else // Musl |