git: 7bcfdc285927 - main - java/openjdk20: fix build on powerpc64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Oct 2023 14:02:17 UTC
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=7bcfdc285927ebf11a47b0ba6e424548959ba6ac commit 7bcfdc285927ebf11a47b0ba6e424548959ba6ac Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: 2023-10-02 14:00:12 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-10-02 14:02:15 +0000 java/openjdk20: fix build on powerpc64 --- java/openjdk20/Makefile | 1 + ...tspot_os__cpu_bsd__ppc_javaThread__bsd__ppc.cpp | 28 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) 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());