[packages/openjdk24] Try to fix x32
arekm
arekm at pld-linux.org
Tue Mar 10 12:51:39 CET 2026
commit 30823f7c0fe0a29e0abd4a260383acead337339b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Tue Mar 10 12:51:33 2026 +0100
Try to fix x32
openjdk24.spec | 6 ++++++
x32.patch | 38 ++++++++++++++++++++++++++++++++++++++
2 files changed, 44 insertions(+)
---
diff --git a/openjdk24.spec b/openjdk24.spec
index 317ca8a..5003eca 100644
--- a/openjdk24.spec
+++ b/openjdk24.spec
@@ -7,6 +7,10 @@
%define use_jdk openjdk24
%endif
+%ifarch x32
+%define with_zero 1
+%endif
+
%ifarch %{ix86} %{x8664} aarch64
%define with_shenandoahgc 1
%endif
@@ -30,6 +34,7 @@ Source0: https://github.com/openjdk/jdk24u/archive/jdk-%{version}-ga/%{name}-%{v
Source10: make-cacerts.sh
Patch0: no_optflags.patch
Patch1: no_optflags_vardeps.patch
+Patch2: x32.patch
URL: http://openjdk.java.net/
BuildRequires: /usr/bin/jar
BuildRequires: alsa-lib-devel
@@ -343,6 +348,7 @@ Przykłady dla OpenJDK.
# 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'
%patch -P1 -p1
+%patch -P2 -p1
%build
# Make sure we have /proc mounted - otherwise idlc will fail later.
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/openjdk24.git/commitdiff/30823f7c0fe0a29e0abd4a260383acead337339b
More information about the pld-cvs-commit
mailing list