[packages/openjdk22] Try to fix x32

arekm arekm at pld-linux.org
Tue Mar 10 12:40:12 CET 2026


commit 76ebba76ff51dba055fc1ec6ba75ff12a39392c7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Mar 10 12:40:06 2026 +0100

    Try to fix x32

 openjdk22.spec |  6 ++++++
 x32.patch      | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
---
diff --git a/openjdk22.spec b/openjdk22.spec
index d02e7f4..feb04a6 100644
--- a/openjdk22.spec
+++ b/openjdk22.spec
@@ -7,6 +7,10 @@
 %define		use_jdk	openjdk22
 %endif
 
+%ifarch x32
+%define		with_zero	1
+%endif
+
 %ifarch %{ix86} %{x8664} aarch64
 %define		with_shenandoahgc	1
 %endif
@@ -29,6 +33,7 @@ Source0:	https://github.com/openjdk/jdk22u/archive/jdk-%{version}-ga/%{name}-%{v
 # Source0-md5:	13b4e71252055e6d78ae12b8db5021d4
 Source10:	make-cacerts.sh
 Patch0:		no_optflags.patch
+Patch1:		x32.patch
 URL:		http://openjdk.java.net/
 BuildRequires:	/usr/bin/jar
 BuildRequires:	alsa-lib-devel
@@ -338,6 +343,7 @@ Przykłady dla OpenJDK.
 %setup -qn jdk22u-jdk-%{version}-ga
 
 %patch -P0 -p1
+%patch -P1 -p1
 
 # Rename uabs to g_uabs to avoid conflict with glibc uabs (GCC 15+)
 find src/hotspot -name "*.hpp" -o -name "*.cpp" | xargs %{__sed} -i 's/\buabs\b/g_uabs/g'
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..6b218f5
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,38 @@
+--- a/make/autoconf/platform.m4.orig	2024-01-01 00:00:00.000000000 +0100
++++ b/make/autoconf/platform.m4	2024-01-01 00:00:00.000000000 +0100
+@@ -30,17 +30,19 @@
+ [
+   # First argument is the cpu name from the trip/quad
+   case "$1" in
+-    x86_64*x32)
+-      VAR_CPU=x32
+-      VAR_CPU_ARCH=x86
+-      VAR_CPU_BITS=32
+-      VAR_CPU_ENDIAN=little
+-      ;;
+     x86_64)
+       VAR_CPU=x86_64
+       VAR_CPU_ARCH=x86
+       VAR_CPU_BITS=64
+       VAR_CPU_ENDIAN=little
++      case "$host" in
++        *x32)
++          VAR_CPU=x32
++          VAR_CPU_ARCH=x86
++          VAR_CPU_BITS=32
++          VAR_CPU_ENDIAN=little
++          ;;
++      esac
+       ;;
+     i?86)
+       VAR_CPU=x86
+--- a/src/java.base/share/classes/jdk/internal/util/Architecture.java.orig	2024-01-01 00:00:00.000000000 +0100
++++ b/src/java.base/share/classes/jdk/internal/util/Architecture.java	2024-01-01 00:00:00.000000000 +0100
+@@ -55,6 +55,7 @@
+     SPARCV9(64, ByteOrder.BIG_ENDIAN),
+     X86(32, ByteOrder.LITTLE_ENDIAN),
+     X64(64, ByteOrder.LITTLE_ENDIAN),  // Represents AMD64 and X86_64
++    X32(32, ByteOrder.LITTLE_ENDIAN),
+     ;
+
+     private final int addrSize;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openjdk22.git/commitdiff/76ebba76ff51dba055fc1ec6ba75ff12a39392c7



More information about the pld-cvs-commit mailing list