From c82f83d2c3e0b848f3d1d992ecfc840fa56db184 Mon Sep 17 00:00:00 2001 From: Dingli Zhang Date: Thu, 29 Aug 2024 05:07:11 +0000 Subject: [PATCH 1/2] Fix build on riscv64 in prep stage for 8u422 --- add-riscv64-support.patch | 6 +++--- openjdk-1.8.0.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/add-riscv64-support.patch b/add-riscv64-support.patch index 8dda639..250feb7 100644 --- a/add-riscv64-support.patch +++ b/add-riscv64-support.patch @@ -90,14 +90,14 @@ index 54cfcdd1..88eb8acd 100644 #if (defined IA32) @@ -2010,9 +2014,11 @@ void * os::dll_load(const char *filename, char *ebuf, int ebuflen) static Elf32_Half running_arch_code=EM_AARCH64; - #elif (defined LOONGARCH) + #elif (defined LOONGARCH64) static Elf32_Half running_arch_code=EM_LOONGARCH; + #elif (defined RISCV) + static Elf32_Half running_arch_code=EM_RISCV; #else #error Method os::dll_load requires that one of following is defined:\ -- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH -+ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH, RISCV +- IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH64 ++ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K, AARCH64, LOONGARCH64, RISCV #endif // Identify compatability class for VM's architecture and library's architecture diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 26ebd5e..36bf1d7 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -943,7 +943,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 1 +Release: 2 # 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 # also included the epoch in their virtual provides. This created a @@ -2656,6 +2656,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %endif %changelog +* Thu Aug 29 2024 Dingli Zhang -1:1.8.0.422-b05.2 +- Fix build on riscv64 in prep stage for 8u422 + * Fri Tue 26 2024 benshuai5D -1:1.8.0.422-b05.1 - Add The-fast-serialization-function-of-sun.rmi.transport.patch -- Gitee From 4562922ae0a9575bf4e6c294f629ee7f7011c871 Mon Sep 17 00:00:00 2001 From: Dingli Zhang Date: Mon, 2 Sep 2024 08:59:09 +0000 Subject: [PATCH 2/2] Fix build error on riscv64 because of patch438 --- openjdk-1.8.0.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 36bf1d7..3808e1a 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -943,7 +943,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{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 # also included the epoch in their virtual provides. This created a @@ -1991,7 +1991,9 @@ pushd %{top_level_dir_name} %patch435 -p1 %patch436 -p1 %patch437 -p1 +%ifnarch riscv64 %patch438 -p1 +%endif %patch439 -p1 %patch440 -p1 %patch441 -p1 @@ -2656,6 +2658,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %endif %changelog +* Mon Sep 2 2024 Dingli Zhang -1:1.8.0.422-b05.3 +- Fix build error on riscv64 because of patch438 + * Thu Aug 29 2024 Dingli Zhang -1:1.8.0.422-b05.2 - Fix build on riscv64 in prep stage for 8u422 -- Gitee