git: d1191b769e7f - main - java/openjdk17: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Wed, 25 Oct 2023 06:43:55 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d1191b769e7f39f0d9d67102a035454a9a486c87

commit d1191b769e7f39f0d9d67102a035454a9a486c87
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-10-25 06:31:21 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-10-25 06:43:52 +0000

    java/openjdk17: fix build on powerpc64*
    
    Backport the patch from openjdk19 to fix the recently appearing error:
    /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.9-9-1/src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp:194:29: error: no member named 'is_safefetch_fault' in 'StubRoutines'
        if (pc && StubRoutines::is_safefetch_fault(pc)) {
                  ~~~~~~~~~~~~~~^
    /wrkdirs/usr/ports/java/openjdk17/work/jdk17u-jdk-17.0.9-9-1/src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp:195:52: error: no member named 'continuation_for_safefetch_fault' in 'StubRoutines'
          os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
                                         ~~~~~~~~~~~~~~^
---
 ...atch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/java/openjdk17/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp b/java/openjdk17/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp
new file mode 100644
index 000000000000..d3b0e0b9821e
--- /dev/null
+++ b/java/openjdk17/files/patch-src_hotspot_os__cpu_bsd__ppc_os__bsd__ppc.cpp
@@ -0,0 +1,19 @@
+--- src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp.orig	2022-12-21 16:54:47 UTC
++++ src/hotspot/os_cpu/bsd_ppc/os_bsd_ppc.cpp
+@@ -187,16 +187,6 @@ frame os::current_frame() {
+ bool PosixSignals::pd_hotspot_signal_handler(int sig, siginfo_t* info,
+                                              ucontext_t* uc, JavaThread* thread) {
+ 
+-  // Moved SafeFetch32 handling outside thread!=NULL conditional block to make
+-  // it work if no associated JavaThread object exists.
+-  if (uc) {
+-    address const pc = os::Posix::ucontext_get_pc(uc);
+-    if (pc && StubRoutines::is_safefetch_fault(pc)) {
+-      os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
+-      return true;
+-    }
+-  }
+-
+   // decide if this trap can be handled by a stub
+   address stub = NULL;
+   address pc   = NULL;