[packages/openjdk8] up to 1.8.0.472

atler atler at pld-linux.org
Thu Oct 23 11:46:23 CEST 2025


commit 25a5d4d029a1e33beb6b73627fbaab44df5e1881
Author: Jan Palus <atler at pld-linux.org>
Date:   Thu Oct 23 11:46:08 2025 +0200

    up to 1.8.0.472

 glibc-2.42-aarch32.patch | 130 +++++++++++++++++++++++++++++++++++++++++++++++
 glibc-2.42.patch         | 104 +++++++++++++++++++++++++++++++++++++
 openjdk8.spec            |  20 +++++---
 3 files changed, 246 insertions(+), 8 deletions(-)
---
diff --git a/openjdk8.spec b/openjdk8.spec
index 8fb6b39..ba4da35 100644
--- a/openjdk8.spec
+++ b/openjdk8.spec
@@ -14,7 +14,7 @@
 # class data version seen with file(1) that this jvm is able to load
 %define		_classdataversion 52.0
 
-%define	ver_u	462
+%define	ver_u	472
 
 Summary:	Open-source implementation of the Java Platform, Standard Edition
 Summary(pl.UTF-8):	Wolnoźródłowa implementacja Java 8 SE
@@ -25,9 +25,9 @@ Epoch:		1
 License:	GPL v2
 Group:		Development/Languages/Java
 Source0:	https://github.com/openjdk/jdk8u/archive/jdk8u%{ver_u}-ga/%{name}-%{version}.tar.gz
-# Source0-md5:	e57935b60c7bc42406208241e95e393c
-Source1:	https://github.com/openjdk/aarch32-port-jdk8u/archive/jdk8u%{ver_u}-ga-aarch32-20250718/%{name}-aarch32-%{version}.tar.gz
-# Source1-md5:	e2f58dfebf5e7cd6d0fca6fca6b0afbf
+# Source0-md5:	38e04a095d9954f820be3f2685d90a45
+Source1:	https://github.com/openjdk/aarch32-port-jdk8u/archive/jdk8u%{ver_u}-ga-aarch32-20251022/%{name}-aarch32-%{version}.tar.gz
+# Source1-md5:	2ff3a1d0535e415094f843b4bf70c5aa
 Source2:	make-cacerts.sh
 Patch0:		adjust-mflags.patch
 Patch1:		format_strings.patch
@@ -45,6 +45,8 @@ Patch13:	hotspot-disable-werror.patch
 Patch14:	ignore-java-options.patch
 Patch15:	default-assumemp.patch
 Patch16:	gcc14.patch
+Patch17:	glibc-2.42.patch
+Patch18:	glibc-2.42-aarch32.patch
 URL:		http://openjdk.java.net/
 BuildRequires:	/usr/bin/jar
 BuildRequires:	alsa-lib-devel
@@ -433,13 +435,15 @@ tar xf %{SOURCE0} --strip-components=1
 %patch -P8 -p1
 %patch -P9 -p1
 %patch -P10 -p1
-%ifarch %{arm}
-%patch -P12 -p1
-%endif
 %patch -P13 -p1
 %patch -P14 -p1
 %patch -P15 -p1
 %patch -P16 -p1
+%patch -P17 -p1
+%ifarch %{arm}
+%patch -P12 -p1
+%patch -P18 -p1
+%endif
 
 %build
 # Make sure we have /proc mounted - otherwise idlc will fail later.
@@ -475,7 +479,7 @@ chmod a+x configure
 	--with-jvm-variants=%{jvm_type} \
 %endif
 	--with-boot-jdk="%{java_home}" \
-	--with-extra-cflags="%{rpmcppflags} %{rpmcflags}" \
+	--with-extra-cflags="%{rpmcppflags} %{rpmcflags} -std=c99" \
 	--with-extra-cxxflags="%{rpmcppflags} %{rpmcxxflags}" \
 	--with-extra-ldflags="%{rpmldflags}" \
 	--with-native-debug-symbols=none \
diff --git a/glibc-2.42-aarch32.patch b/glibc-2.42-aarch32.patch
new file mode 100644
index 0000000..be752f7
--- /dev/null
+++ b/glibc-2.42-aarch32.patch
@@ -0,0 +1,130 @@
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/assembler_aarch32.hpp.orig	2025-10-22 07:38:33.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/assembler_aarch32.hpp	2025-10-23 01:32:01.375266456 +0200
+@@ -264,7 +264,7 @@
+ 
+ #define starti Instruction_aarch32 do_not_use(this); set_current(&do_not_use)
+ 
+-static inline unsigned long uabs(long n) { return uabs((jlong)n); }
++static inline unsigned long g_uabs(long n) { return g_uabs((jlong)n); }
+ 
+ #define S_DFLT ::lsl()
+ #define C_DFLT AL
+@@ -1169,10 +1169,10 @@
+     switch(decode) {
+       case 0b010:
+         // LDR, LDRB, STR, STRB
+-        return uabs(offset) < (1 << 12);
++        return g_uabs(offset) < (1 << 12);
+       case 0b000:
+         //LDRD, LDRH, LDRSB, LDRSH, STRH, STRD
+-        return uabs(offset) < (1 << 8);
++        return g_uabs(offset) < (1 << 8);
+       default:
+         ShouldNotReachHere();
+     }
+@@ -1516,7 +1516,7 @@
+   // are out of range.
+   static const unsigned long branch_range = NOT_DEBUG(32 * M) DEBUG_ONLY(2 * M);
+   static bool reachable_from_branch_at(address branch, address target) {
+-    return uabs(target - branch) < branch_range;
++    return g_uabs(target - branch) < branch_range;
+   }
+ 
+   void branch_imm_instr(int decode, address dest, Condition cond) {
+@@ -2102,7 +2102,7 @@
+   static bool is_valid_for_imm12(int imm);
+ 
+   static bool is_valid_for_offset_imm(int imm, int nbits) {
+-    return uabs(imm) < (1u << nbits);
++    return g_uabs(imm) < (1u << nbits);
+   }
+ 
+   static bool operand_valid_for_logical_immediate(bool is32, uint64_t imm);
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/assembler_aarch32.cpp.orig	2025-10-22 07:38:33.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/assembler_aarch32.cpp	2025-10-23 01:32:01.398599171 +0200
+@@ -1341,7 +1341,7 @@
+     }
+     bool U = offset >= 0;
+     assert(0 == (offset & 3), "Can only access aligned data");
+-    unsigned imm8 = uabs(offset) / 4;
++    unsigned imm8 = g_uabs(offset) / 4;
+     i->f(U, 23), i->rf(_base, 16), i->f(imm8, 7, 0);
+   } else {
+     ShouldNotReachHere();
+@@ -1735,7 +1735,7 @@
+ 
+   //Try plan B - a mov first - need to have destination that is not an arg
+   assert(Rd != Rn, "Can't use imm and can't do a mov. I'm in a jam.");
+-  mov_immediate(Rd, (uint32_t)uabs(imm), cond, s);
++  mov_immediate(Rd, (uint32_t)g_uabs(imm), cond, s);
+   //Now do the non immediate version - copied from the immediate encodings
+   {
+     starti;
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/macroAssembler_aarch32.cpp.orig	2025-10-22 07:38:33.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/macroAssembler_aarch32.cpp	2025-10-23 01:32:01.411932150 +0200
+@@ -89,23 +89,23 @@
+       instructions = patch_oop(branch, target) / NativeInstruction::arm_insn_sz;
+   } else if (0b010 == (opc >> 1)) {
+     // LDR, LDRB, STR, STRB
+-    Instruction_aarch32::patch(branch, 11, 0, uabs(offset));
++    Instruction_aarch32::patch(branch, 11, 0, g_uabs(offset));
+     Instruction_aarch32::patch(branch, 23, 23, add);
+   } else if (0b000 == (opc >> 1)) {
+     // LDRH, LDRSH, LDRSB, LDRD, STRH, STRD
+-    offset = uabs(offset);
++    offset = g_uabs(offset);
+     Instruction_aarch32::patch(branch, 3, 0, offset & 0xf);
+     Instruction_aarch32::patch(branch, 11, 8, offset >> 4);
+     Instruction_aarch32::patch(branch, 23, 23, add);
+   } else if (0b1101 == opc) {
+     // VLDR, VSTR - NOTE VSTR(lit) is deprecated
+-    offset = uabs(offset);
++    offset = g_uabs(offset);
+     assert(0 == (offset & 3), "vldr, vstr can't do unaligned access");
+     Instruction_aarch32::patch(branch, 7, 0, offset >> 2);
+     Instruction_aarch32::patch(branch, 23, 23, add);
+   } else if (0b0010 == opc) {
+     // ADR
+-    Instruction_aarch32::patch(branch, 11, 0, encode_imm12(uabs(offset)));
++    Instruction_aarch32::patch(branch, 11, 0, encode_imm12(g_uabs(offset)));
+     Instruction_aarch32::patch(branch, 23, 22, add ? 0b10 : 0b01 );
+   } else {
+     ShouldNotReachHere();
+@@ -2942,7 +2942,7 @@
+ int MacroAssembler::ldrd(Register Rt, Register Rt2, const Address& adr, Register Rtmp, Condition cond) {
+     if((0 == Rt->encoding_nocheck() % 2 &&
+          (Rt->encoding_nocheck() + 1 == Rt2->encoding_nocheck())) &&
+-      (uabs(adr.offset()) < (1 << 8))) {
++      (g_uabs(adr.offset()) < (1 << 8))) {
+       /* Good to go with a ldrd */
+       ldrd(Rt, adr, cond);
+       return 0x0;
+@@ -2955,7 +2955,7 @@
+ int MacroAssembler::strd(Register Rt, Register Rt2, const Address& adr, Condition cond) {
+     if((0 == Rt->encoding_nocheck() % 2 &&
+          (Rt->encoding_nocheck() + 1 == Rt2->encoding_nocheck())) &&
+-      (uabs(adr.offset()) < (1 << 8))) {
++      (g_uabs(adr.offset()) < (1 << 8))) {
+       /* Good to go with a strd */
+       strd(Rt, adr, cond);
+     } else {
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/stubGenerator_aarch32.cpp.orig	2025-10-22 07:38:33.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch32/vm/stubGenerator_aarch32.cpp	2025-10-23 01:32:01.435264865 +0200
+@@ -654,7 +654,7 @@
+   // bytes, so a caller doesn't have to mask them.
+ 
+   void copy_memory_small(Register s, Register d, Register count, Register tmp, bool is_aligned, int step) {
+-    const int granularity = uabs(step);
++    const int granularity = g_uabs(step);
+     const bool gen_always = !is_aligned || (-4 < step && step < 0);
+     Label halfword, done;
+ 
+@@ -716,7 +716,7 @@
+   void copy_memory(bool is_aligned, Register s, Register d,
+                    Register count, Register tmp, int step) {
+     const int small_copy_size = 32; // 1 copy by ldm pays off alignment efforts and push/pop of temp set
+-    const int granularity = uabs(step);
++    const int granularity = g_uabs(step);
+     const Register tmp2 = rscratch2;
+     const Register t0 = r3;
+     Label small;
diff --git a/glibc-2.42.patch b/glibc-2.42.patch
new file mode 100644
index 0000000..d834369
--- /dev/null
+++ b/glibc-2.42.patch
@@ -0,0 +1,104 @@
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/macroAssembler_aarch64.cpp	2025-10-22 19:12:50.471801442 +0200
+@@ -2023,7 +2023,7 @@
+   if (operand_valid_for_add_sub_immediate((int)imm)) {
+     (this->*insn1)(Rd, Rn, imm);
+   } else {
+-    if (uabs(imm) < (1 << 24)) {
++    if (g_uabs(imm) < (1 << 24)) {
+        (this->*insn1)(Rd, Rn, imm & -(1 << 12));
+        (this->*insn1)(Rd, Rd, imm & ((1 << 12)-1));
+     } else {
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/assembler_aarch64.cpp	2025-10-22 19:13:06.174673706 +0200
+@@ -1445,7 +1445,7 @@
+ 
+ bool Assembler::operand_valid_for_add_sub_immediate(long imm) {
+   bool shift = false;
+-  unsigned long uimm = uabs(imm);
++  unsigned long uimm = g_uabs(imm);
+   if (uimm < (1 << 12))
+     return true;
+   if (uimm < (1 << 24)
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/assembler_aarch64.hpp	2025-10-22 19:13:16.714364141 +0200
+@@ -825,7 +825,7 @@
+   static const unsigned long branch_range = NOT_DEBUG(128 * M) DEBUG_ONLY(2 * M);
+ 
+   static bool reachable_from_branch_at(address branch, address target) {
+-    return uabs(target - branch) < branch_range;
++    return g_uabs(target - branch) < branch_range;
+   }
+ 
+   // Unconditional branch (immediate)
+--- openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/cpu/aarch64/vm/stubGenerator_aarch64.cpp	2025-10-22 19:13:47.313464974 +0200
+@@ -1093,7 +1093,7 @@
+ 
+   void copy_memory_small(Register s, Register d, Register count, Register tmp, int step) {
+     bool is_backwards = step < 0;
+-    size_t granularity = uabs(step);
++    size_t granularity = g_uabs(step);
+     int direction = is_backwards ? -1 : 1;
+     int unit = wordSize * direction;
+ 
+@@ -1149,7 +1149,7 @@
+                    Register count, Register tmp, int step) {
+     copy_direction direction = step < 0 ? copy_backwards : copy_forwards;
+     bool is_backwards = step < 0;
+-    int granularity = uabs(step);
++    int granularity = g_uabs(step);
+     const Register t0 = r3, t1 = r4;
+ 
+     // <= 96 bytes do inline. Direction doesn't matter because we always
+--- openjdk8-1.8.0.472/hotspot/src/share/vm/utilities/globalDefinitions.hpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/share/vm/utilities/globalDefinitions.hpp	2025-10-22 19:14:12.296063730 +0200
+@@ -1254,7 +1254,7 @@
+ 
+ // abs methods which cannot overflow and so are well-defined across
+ // the entire domain of integer types.
+-static inline unsigned int uabs(unsigned int n) {
++static inline unsigned int g_uabs(unsigned int n) {
+   union {
+     unsigned int result;
+     int value;
+@@ -1263,7 +1263,7 @@
+   if (value < 0) result = 0-result;
+   return result;
+ }
+-static inline julong uabs(julong n) {
++static inline julong g_uabs(julong n) {
+   union {
+     julong result;
+     jlong value;
+@@ -1272,8 +1272,8 @@
+   if (value < 0) result = 0-result;
+   return result;
+ }
+-static inline julong uabs(jlong n) { return uabs((julong)n); }
+-static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
++static inline julong g_uabs(jlong n) { return g_uabs((julong)n); }
++static inline unsigned int g_uabs(int n) { return g_uabs((unsigned int)n); }
+ 
+ // "to" should be greater than "from."
+ inline intx byte_size(void* from, void* to) {
+--- openjdk8-1.8.0.472/hotspot/src/share/vm/opto/mulnode.cpp.orig	2025-10-13 23:25:43.000000000 +0200
++++ openjdk8-1.8.0.472/hotspot/src/share/vm/opto/mulnode.cpp	2025-10-22 19:14:55.098137642 +0200
+@@ -189,7 +189,7 @@
+   // Check for negative constant; if so negate the final result
+   bool sign_flip = false;
+ 
+-  unsigned int abs_con = uabs(con);
++  unsigned int abs_con = g_uabs(con);
+   if (abs_con != (unsigned int)con) {
+     sign_flip = true;
+   }
+@@ -285,7 +285,7 @@
+ 
+   // Check for negative constant; if so negate the final result
+   bool sign_flip = false;
+-  julong abs_con = uabs(con);
++  julong abs_con = g_uabs(con);
+   if (abs_con != (julong)con) {
+     sign_flip = true;
+   }
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openjdk8.git/commitdiff/25a5d4d029a1e33beb6b73627fbaab44df5e1881



More information about the pld-cvs-commit mailing list