diff --git a/8316859-RISC-V-Disable-detection-of-V-through-HWCAP.patch b/8316859-RISC-V-Disable-detection-of-V-through-HWCAP.patch deleted file mode 100644 index 95c3bfffc386f9d511e640e89ed8d6c1d0d454de..0000000000000000000000000000000000000000 --- a/8316859-RISC-V-Disable-detection-of-V-through-HWCAP.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 1013f0b0b911d24eed216485767ec6eb080afa81 Mon Sep 17 00:00:00 2001 -From: Ludovic Henry -Date: Mon, 25 Sep 2023 08:01:45 +0000 -Subject: [PATCH] 8316859: RISC-V: Disable detection of V through HWCAP - ---- - .../os_cpu/linux_riscv/vm_version_linux_riscv.cpp | 15 ++++++++++++--- - 1 file changed, 12 insertions(+), 3 deletions(-) - -diff --git a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp -index 454ffbb06d390..69bbf9f366b31 100644 ---- a/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp -+++ b/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp -@@ -149,12 +149,21 @@ void VM_Version::setup_cpu_available_features() { - - void VM_Version::os_aux_features() { - uint64_t auxv = getauxval(AT_HWCAP); -- int i = 0; -- while (_feature_list[i] != nullptr) { -+ for (int i = 0; _feature_list[i] != nullptr; i++) { -+ if (_feature_list[i]->feature_bit() == HWCAP_ISA_V) { -+ // Special case for V: some dev boards only support RVV version 0.7, while -+ // the OpenJDK only supports RVV version 1.0. These two versions are not -+ // compatible with each other. Given the V bit is set through HWCAP on -+ // some custom kernels, regardless of the version, it can lead to -+ // generating V instructions on boards that don't support RVV version 1.0 -+ // (ex: Sipeed LicheePi), leading to a SIGILL. -+ // That is an acceptable workaround as only Linux Kernel v6.5+ supports V, -+ // and that version already support hwprobe anyway -+ continue; -+ } - if ((_feature_list[i]->feature_bit() & auxv) != 0) { - _feature_list[i]->enable_feature(); - } -- i++; - } - } - diff --git a/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz b/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f3c8511e1bf935df3e8ed099d5a245961d2312c7 Binary files /dev/null and b/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz differ diff --git a/openjdk-latest.spec b/openjdk-latest.spec index cfe349d7fd7388cda86e64bfee93f1dc103d1eb2..e841b952e9a7a0fbe925bd17f4e0bb210ec8cae5 100644 --- a/openjdk-latest.spec +++ b/openjdk-latest.spec @@ -898,7 +898,7 @@ Name: java-latest-%{origin} Version: %{newjavaver}.%{buildver} # This package needs `.rolling` as part of Release so as to not conflict on install with # java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as -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 @@ -936,6 +936,7 @@ URL: http://openjdk.java.net/ Source0: jdk-updates-jdk%{majorver}u-jdk-%{filever}+%{buildver}.tar.gz Source1: OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz Source2: OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz +Source3: https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz # Desktop files. Adapted from IcedTea @@ -980,13 +981,6 @@ Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_a Patch7: downgrade-the-glibc-symver-of-memcpy.patch Patch8: downgrade-the-glibc-symver-of-log2f-posix_spawn.patch -############################################ -# -# RISC-V specific patches -# -############################################ -Patch2000: 8316859-RISC-V-Disable-detection-of-V-through-HWCAP.patch - ############################################ # # LoongArch64 specific patches @@ -1227,12 +1221,6 @@ popd # openjdk %patch1000 -%ifarch riscv64 -pushd %{top_level_dir_name} -%patch2000 -p1 -popd -%endif - %ifarch loongarch64 pushd %{top_level_dir_name} %patch3000 -p1 @@ -1350,7 +1338,8 @@ elif [ "$ARCH" = "aarch64" ]; then tar -xf %{SOURCE1} BOOTJDKPATH=$PWD/jdk-21.0.3+9 elif [ "$ARCH" = "riscv64" ]; then - : + tar -xf %{SOURCE3} + BOOTJDKPATH=$PWD/jdk-21.0.3+9 elif [ "$ARCH" = "loongarch64" ]; then : elif [ "$ARCH" = "ppc64le" ]; then @@ -1810,10 +1799,15 @@ cjc.mainProgram(arg) %changelog +* Fri Jul 12 2024 Dingli Zhang - 1:22.0.0.36-3 +- Remove Backport JDK-8316859 for riscv64 +- Fix typo in changelog +- Add bootjdk for riscv64 + * Tue Jun 25 2024 panxuefeng - 1:22.0.0.36-2 - update to jdk22+36 for loongarch64 -* Tue Jun 25 2024 peng.zou - 1:21.0.0.36-1 +* Tue Jun 25 2024 peng.zou - 1:22.0.0.36-1 - Add support for ppc64le * Wed Jun 05 2024 Autistic_boyya - 1:22.0.0.36-rolling