From a6b8a56329ed7cd344b9892809b5fac4e4822da0 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Tue, 4 Jun 2024 08:56:40 +0000 Subject: [PATCH] fix build error for loongarch64 (cherry picked from commit 8a9e00e622dedb576f3b736bac8c815b35fec969) --- 0001-fix-build-error-for-loongarch64.patch | 28 ++++++++++++++++++++++ apache-commons-daemon.spec | 6 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-fix-build-error-for-loongarch64.patch diff --git a/0001-fix-build-error-for-loongarch64.patch b/0001-fix-build-error-for-loongarch64.patch new file mode 100644 index 0000000..146bb20 --- /dev/null +++ b/0001-fix-build-error-for-loongarch64.patch @@ -0,0 +1,28 @@ +From 4334ce2b322f7f958606b9b6003d7e6feba052cf Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Tue, 4 Jun 2024 08:48:30 +0000 +Subject: [PATCH] fix build error for loongarch64 + +--- + src/native/unix/configure | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/native/unix/configure b/src/native/unix/configure +index cbdc8bd..8079a65 100755 +--- a/src/native/unix/configure ++++ b/src/native/unix/configure +@@ -3813,6 +3813,11 @@ printf "%s\n" "failed" >&6; } + supported_os="linux" + HOST_CPU=riscv64 + ;; ++ loongarch64) ++ CFLAGS="$CFLAGS -DCPU=\\\"loongarch64\\\"" ++ supported_os="linux" ++ HOST_CPU=loongarch64 ++ ;; + *) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 + printf "%s\n" "failed" >&6; } +-- +2.43.0 + diff --git a/apache-commons-daemon.spec b/apache-commons-daemon.spec index 85e7392..78fcd75 100644 --- a/apache-commons-daemon.spec +++ b/apache-commons-daemon.spec @@ -1,6 +1,6 @@ Name: apache-commons-daemon Version: 1.3.3 -Release: 1 +Release: 2 Summary: Defines API to support an alternative invocation mechanism License: ASL 2.0 URL: http://commons.apache.org/daemon @@ -14,6 +14,7 @@ Patch0001: apache-commons-daemon-JAVA_OS.patch Patch0002: apache-commons-daemon-secondary.patch Patch0003: apache-commons-daemon-aarch64.patch Patch0004: 0001-Fix-build-failed-on-openEuler-RISC-V.patch +Patch0005: 0001-fix-build-error-for-loongarch64.patch %description The scope of this package is to define an API in line with the current Java Platform APIs to support @@ -63,6 +64,9 @@ install -Dpm 644 src/native/unix/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1/jsvc.1 %{_mandir}/man1/jsvc.1* %changelog +* Tue Jun 04 2024 Wenlong Zhang - 1.3.3-2 +- fix build error for loongarch64 + * Tue May 09 2023 Ge Wang - 1.3.3-1 - Update to version 1.3.3