diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-10-02 14:00:12 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2023-10-02 14:02:15 +0000 |
commit | 7bcfdc285927ebf11a47b0ba6e424548959ba6ac (patch) | |
tree | 1aaf03323172e48c26a6e532e2fe437d0411239a | |
parent | 49e30b9d76e1afa1bad1a3017ed9cc57cc0b694a (diff) |
java/openjdk20: fix build on powerpc64
-rw-r--r-- | java/openjdk20/Makefile | 1 | ||||
-rw-r--r-- | java/openjdk20/files/patch-src_hotspot_os__cpu_bsd__ppc_javaThread__bsd__ppc.cpp | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/java/openjdk20/Makefile b/java/openjdk20/Makefile index 24694c1357d7..00ae6a7f6247 100644 --- a/java/openjdk20/Makefile +++ b/java/openjdk20/Makefile @@ -175,6 +175,7 @@ ICONV_LIBS= ${ICONV_LIB} .endif post-patch: + @${RM} ${WRKSRC}/src/hotspot/os_cpu/bsd_ppc/thread_bsd_ppc.cpp @${FIND} ${WRKSRC} -name '*.orig' -delete @${CHMOD} 755 ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \ diff --git a/java/openjdk20/files/patch-src_hotspot_os__cpu_bsd__ppc_javaThread__bsd__ppc.cpp b/java/openjdk20/files/patch-src_hotspot_os__cpu_bsd__ppc_javaThread__bsd__ppc.cpp new file mode 100644 index 000000000000..513f41c41191 --- /dev/null +++ b/java/openjdk20/files/patch-src_hotspot_os__cpu_bsd__ppc_javaThread__bsd__ppc.cpp @@ -0,0 +1,28 @@ +--- src/hotspot/os_cpu/bsd_ppc/javaThread_bsd_ppc.cpp.orig 2023-10-02 13:02:10 UTC ++++ src/hotspot/os_cpu/bsd_ppc/javaThread_bsd_ppc.cpp +@@ -58,14 +58,14 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* + // if we were running Java code when SIGPROF came in. + if (isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; +- address pc = (address)uc->uc_mcontext.regs->nip; ++ address pc = (address)uc->uc_mcontext.mc_srr0; + + if (pc == NULL) { + // ucontext wasn't useful + return false; + } + +- frame ret_frame((intptr_t*)uc->uc_mcontext.regs->gpr[1/*REG_SP*/], pc); ++ frame ret_frame((intptr_t*)uc->uc_mcontext.mc_gpr[1/*REG_SP*/], pc); + + if (ret_frame.fp() == NULL) { + // The found frame does not have a valid frame pointer. +@@ -84,7 +84,7 @@ bool JavaThread::pd_get_top_frame_for_profiling(frame* + if (!Method::is_valid_method(m)) return false; + if (!Metaspace::contains(m->constMethod())) return false; + +- uint64_t reg_bcp = uc->uc_mcontext.regs->gpr[14/*R14_bcp*/]; ++ uint64_t reg_bcp = uc->uc_mcontext.mc_gpr[14/*R14_bcp*/]; + uint64_t istate_bcp = istate->bcp; + uint64_t code_start = (uint64_t)(m->code_base()); + uint64_t code_end = (uint64_t)(m->code_base() + m->code_size()); |