git: 8c49e908cf33 - main - java/openjdk19: Fix the build on x86

From: Greg Lewis <glewis_at_FreeBSD.org>
Date: Thu, 26 Jan 2023 06:51:28 UTC
The branch main has been updated by glewis:

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

commit 8c49e908cf3339870f612b555b6054d10d0e9e7c
Author:     Greg Lewis <glewis@FreeBSD.org>
AuthorDate: 2023-01-26 06:50:17 +0000
Commit:     Greg Lewis <glewis@FreeBSD.org>
CommitDate: 2023-01-26 06:51:23 +0000

    java/openjdk19: Fix the build on x86
---
 ...agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/java/openjdk19/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp b/java/openjdk19/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp
new file mode 100644
index 000000000000..30a55e7d9a9e
--- /dev/null
+++ b/java/openjdk19/files/patch-src_jdk.hotspot.agent_bsd_native_libsaproc_BsdDebuggerLocal.cpp
@@ -0,0 +1,42 @@
+--- src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.cpp	2022-10-20 06:58:23.018695000 -0700
++++ src/jdk.hotspot.agent/bsd/native/libsaproc/BsdDebuggerLocal.cpp	2022-12-29 13:13:27.000625000 -0800
+@@ -35,7 +35,11 @@
+ #define amd64 1
+ #endif
+ 
+-#ifdef i386
++#if defined(i386) && !defined(i586)
++#define i586 1
++#endif
++
++#ifdef i586
+ #include "sun_jvm_hotspot_debugger_x86_X86ThreadContext.h"
+ #endif
+ 
+@@ -347,7 +351,7 @@
+   }
+ 
+ #undef NPRGREG
+-#ifdef i386
++#ifdef i586
+ #define NPRGREG sun_jvm_hotspot_debugger_x86_X86ThreadContext_NPRGREG
+ #endif
+ #ifdef amd64
+@@ -369,7 +373,7 @@
+ 
+ #undef REG_INDEX
+ 
+-#ifdef i386
++#ifdef i586
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_x86_X86ThreadContext_##reg
+ 
+   regs[REG_INDEX(GS)]  = (uintptr_t) gregs.r_gs;
+@@ -388,7 +392,7 @@
+   regs[REG_INDEX(CS)]  = (uintptr_t) gregs.r_cs;
+   regs[REG_INDEX(SS)]  = (uintptr_t) gregs.r_ss;
+ 
+-#endif /* i386 */
++#endif /* i586 */
+ 
+ #ifdef amd64
+ #define REG_INDEX(reg) sun_jvm_hotspot_debugger_amd64_AMD64ThreadContext_##reg