From 15b114242d8c84da25e73b5c4f90e1c73d360165 Mon Sep 17 00:00:00 2001 From: swcompiler Date: Thu, 23 Oct 2025 20:48:28 +0800 Subject: [PATCH] fix compilation error with gcc1230 (cherry picked from commit 8b05e2b9ec6aef464ae091847b667d3b0e293881) --- openjdk-17.spec | 5 ++++- sw_64-support.patch | 39 +++++++++++++++++---------------------- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/openjdk-17.spec b/openjdk-17.spec index 62a6ba3..ee522fc 100644 --- a/openjdk-17.spec +++ b/openjdk-17.spec @@ -920,7 +920,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{newjavaver}.%{buildver} -Release: 2 +Release: 3 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages @@ -2001,6 +2001,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %changelog +* Thu Oct 23 2025 swcompiler - 1:17.0.16.8-3 +- fix compilation error with gcc1230 + * Mon Jul 28 2025 wulongyao - 1:17.0.16.8-2 - sync master diff --git a/sw_64-support.patch b/sw_64-support.patch index b8bb1af..e4d97f1 100644 --- a/sw_64-support.patch +++ b/sw_64-support.patch @@ -8114,10 +8114,10 @@ index 00000000000..22bfed475d9 +#endif // CPU_SW64_GC_SHARED_MODREFBARRIERSETASSEMBLER_SW64_HPP diff --git a/src/hotspot/cpu/sw64/globalDefinitions_sw64.hpp b/src/hotspot/cpu/sw64/globalDefinitions_sw64.hpp new file mode 100644 -index 00000000000..169528339b3 +index 00000000000..a77b5e09c5a --- /dev/null +++ b/src/hotspot/cpu/sw64/globalDefinitions_sw64.hpp -@@ -0,0 +1,66 @@ +@@ -0,0 +1,61 @@ +/* + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved. @@ -8142,7 +8142,7 @@ index 00000000000..169528339b3 + * questions. + * + */ -+#include "metaprogramming/enableIf.hpp" ++#include "utilities/powerOfTwo.hpp" + +#ifndef CPU_SW64_VM_GLOBALDEFINITIONS_SW64_HPP +#define CPU_SW64_VM_GLOBALDEFINITIONS_SW64_HPP @@ -8157,11 +8157,6 @@ index 00000000000..169528339b3 + +#define CPU_MULTI_COPY_ATOMIC + -+// true if x is a power of 2, false otherwise -+//template bool is_power_of_2(T x) ; -+template ::value)> -+constexpr bool is_power_of_2(T x); -+ +inline intptr_t mask_bits (intptr_t x, intptr_t m); + +// returns integer round-up to the nearest multiple of s (s must be a power of two) @@ -58316,10 +58311,10 @@ index 7c951cee51c..9c1b4fbafe8 100644 if (err == 0) { realign_memory(addr, size, alignment_hint); diff --git a/src/hotspot/os/posix/os_posix.cpp b/src/hotspot/os/posix/os_posix.cpp -index 4307a189edf..6b42aa6d5e6 100644 +index 1561f50fba7..7048a43a067 100644 --- a/src/hotspot/os/posix/os_posix.cpp +++ b/src/hotspot/os/posix/os_posix.cpp -@@ -1090,7 +1090,7 @@ size_t os::Posix::get_initial_stack_size(ThreadType thr_type, size_t req_stack_s +@@ -1102,7 +1102,7 @@ size_t os::Posix::get_initial_stack_size(ThreadType thr_type, size_t req_stack_s } #ifndef ZERO @@ -58328,7 +58323,7 @@ index 4307a189edf..6b42aa6d5e6 100644 static bool get_frame_at_stack_banging_point(JavaThread* thread, address pc, const void* ucVoid, frame* fr) { if (Interpreter::contains(pc)) { // interpreter performs stack banging after the fixed frame header has -@@ -1126,7 +1126,7 @@ static bool get_frame_at_stack_banging_point(JavaThread* thread, address pc, con +@@ -1138,7 +1138,7 @@ static bool get_frame_at_stack_banging_point(JavaThread* thread, address pc, con assert(fr->is_java_frame(), "Safety check"); return true; } @@ -58337,7 +58332,7 @@ index 4307a189edf..6b42aa6d5e6 100644 // This return true if the signal handler should just continue, ie. return after calling this bool os::Posix::handle_stack_overflow(JavaThread* thread, address addr, address pc, -@@ -1135,8 +1135,8 @@ bool os::Posix::handle_stack_overflow(JavaThread* thread, address addr, address +@@ -1147,8 +1147,8 @@ bool os::Posix::handle_stack_overflow(JavaThread* thread, address addr, address StackOverflow* overflow_state = thread->stack_overflow_state(); if (overflow_state->in_stack_yellow_reserved_zone(addr)) { if (thread->thread_state() == _thread_in_Java) { @@ -60705,10 +60700,10 @@ index 202cba10c5d..ad117c7a9e8 100644 // Test if x is within unsigned immediate range for width. diff --git a/src/hotspot/share/asm/codeBuffer.cpp b/src/hotspot/share/asm/codeBuffer.cpp -index 0012152d48d..a71a9023f67 100644 +index 2d219121cc7..af9efc6fa92 100644 --- a/src/hotspot/share/asm/codeBuffer.cpp +++ b/src/hotspot/share/asm/codeBuffer.cpp -@@ -1165,7 +1165,11 @@ void CodeStrings::free() { +@@ -1164,7 +1164,11 @@ void CodeStrings::free() { const char* CodeStrings::add_string(const char * string) { check_valid(); @@ -61070,10 +61065,10 @@ index e1b8a4e6099..13df836127b 100644 #undef TEST_FILL diff --git a/src/hotspot/share/runtime/thread.cpp b/src/hotspot/share/runtime/thread.cpp -index 59f1475844a..3b3316d0843 100644 +index 8e89abcd344..2fbdb2089cd 100644 --- a/src/hotspot/share/runtime/thread.cpp +++ b/src/hotspot/share/runtime/thread.cpp -@@ -2909,6 +2909,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { +@@ -2867,6 +2867,7 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) { return status; } @@ -61101,7 +61096,7 @@ index 33ecfe089f8..0e785115538 100644 #define LITTLE_ENDIAN_ONLY(code) code #define BIG_ENDIAN_ONLY(code) diff --git a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp -index 9accba375a2..e5145646026 100644 +index 04d8e6b4689..19df31ab48c 100644 --- a/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp +++ b/src/jdk.hotspot.agent/linux/native/libsaproc/LinuxDebuggerLocal.cpp @@ -64,6 +64,10 @@ @@ -61124,7 +61119,7 @@ index 9accba375a2..e5145646026 100644 extern "C" JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0 (JNIEnv *env, jobject this_obj, jint lwp_id) { -@@ -449,6 +453,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo +@@ -448,6 +452,9 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo #endif #if defined(ppc64) || defined(ppc64le) #define NPRGREG sun_jvm_hotspot_debugger_ppc64_PPC64ThreadContext_NPRGREG @@ -61134,7 +61129,7 @@ index 9accba375a2..e5145646026 100644 #endif -@@ -601,6 +608,20 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo +@@ -600,6 +607,20 @@ JNIEXPORT jlongArray JNICALL Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLo #endif @@ -61185,7 +61180,7 @@ index 3068f475626..05b7ac68267 100644 #if defined(PTRACE_GETREGSET) struct iovec iov; diff --git a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java -index 02b66512353..14e5379ede1 100644 +index 4788185f064..3cbeb6abe9c 100644 --- a/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java +++ b/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/HSDB.java @@ -998,7 +998,7 @@ public class HSDB implements ObjectHistogramPanel.Listener, SAListener { @@ -63385,10 +63380,10 @@ index e78e200ac24..6dc8c0fa934 100644 OS("isAix", "isLinux", "isOSX", "isWindows"), VM_TYPE("isClient", "isServer", "isMinimal", "isZero", "isEmbedded"), diff --git a/test/lib/jdk/test/lib/Platform.java b/test/lib/jdk/test/lib/Platform.java -index 2e2e16e6593..8226da5dc20 100644 +index 4f5b61a1f43..0c6a3328b2c 100644 --- a/test/lib/jdk/test/lib/Platform.java +++ b/test/lib/jdk/test/lib/Platform.java -@@ -234,6 +234,11 @@ public class Platform { +@@ -235,6 +235,11 @@ public class Platform { return isArch("(i386)|(x86(?!_64))"); } -- Gitee