!9 [sync] PR-8: add loongarch64 and sw_64 support

From: @openeuler-sync-bot 
Reviewed-by: @small_leek 
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2023-09-22 02:09:05 +00:00 committed by Gitee
commit b7ef18b40d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 161 additions and 1 deletions

View File

@ -0,0 +1,80 @@
From 5e01f749dc35cc1ed56caaf0bcf3da87511c8f4c Mon Sep 17 00:00:00 2001
From: herengui <herengui@kylinsec.com.cn>
Date: Wed, 17 May 2023 18:22:37 +0800
Subject: [PATCH] add loongarch64 support
Signed-off-by: herengui <herengui@kylinsec.com.cn>
---
src/native/unix/configure | 7 ++++++-
src/native/unix/support/apsupport.m4 | 5 ++++-
src/native/unix/support/config.guess | 3 +++
src/native/unix/support/config.sub | 1 +
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/native/unix/configure b/src/native/unix/configure
index 4913319..62f88a0 100755
--- a/src/native/unix/configure
+++ b/src/native/unix/configure
@@ -2713,7 +2713,12 @@ echo "$as_me: error: Unsupported operating system \"$host_os\"" >&2;}
sw64 | sw_64*)
CFLAGS="$CFLAGS -DCPU=\\\"sw_64\\\""
supported_os="sw_64"
- HOST_CPU=sw_64;;
+ HOST_CPU=sw_64
+ ;;
+ loongarch64)
+ CFLAGS="$CFLAGS -DCPU=\\\"loongarch64\\\""
+ supported_os="loongarch64"
+ HOST_CPU=loongarch64;;
*)
echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6
diff --git a/src/native/unix/support/apsupport.m4 b/src/native/unix/support/apsupport.m4
index b43ea86..119e012 100644
--- a/src/native/unix/support/apsupport.m4
+++ b/src/native/unix/support/apsupport.m4
@@ -178,11 +178,14 @@ AC_DEFUN(AP_SUPPORTED_HOST,[
CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\""
supported_os="aarch64"
HOST_CPU=aarch64;;
- *)
sw64 | sw_64*)
CFLAGS="$CFLAGS -DCPU=\\\"sw_64\\\""
supported_os="sw_64"
HOST_CPU=sw_64;;
+ loongarch64)
+ CFLAGS="$CFLAGS -DCPU=\\\"loongarch64\\\""
+ supported_os="loongarch64"
+ HOST_CPU=loongarch64;;
*)
AC_MSG_RESULT([failed])
AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
diff --git a/src/native/unix/support/config.guess b/src/native/unix/support/config.guess
index 19474d3..306f46a 100755
--- a/src/native/unix/support/config.guess
+++ b/src/native/unix/support/config.guess
@@ -868,6 +868,9 @@ EOF
sw_64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ loongarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
diff --git a/src/native/unix/support/config.sub b/src/native/unix/support/config.sub
index cd54017..2d02c4e 100755
--- a/src/native/unix/support/config.sub
+++ b/src/native/unix/support/config.sub
@@ -249,6 +249,7 @@ case $basic_machine in
1750a | 580 \
| a29k \
| sw_64 | sw64 \
+ | loongarch64 \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
--
2.40.1

View File

@ -0,0 +1,75 @@
From 4d23103a3eee5c7d239ff8321678691dcf58b48f Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Wed, 15 Mar 2023 14:59:51 +0800
Subject: [PATCH] apache-commons-daemon-1.0.15-sw
---
src/native/unix/configure | 7 ++++++-
src/native/unix/support/apsupport.m4 | 5 +++++
src/native/unix/support/config.guess | 3 +++
src/native/unix/support/config.sub | 1 +
4 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/native/unix/configure b/src/native/unix/configure
index b8ed883..4913319 100755
--- a/src/native/unix/configure
+++ b/src/native/unix/configure
@@ -2708,7 +2708,12 @@ echo "$as_me: error: Unsupported operating system \"$host_os\"" >&2;}
aarch64*)
CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\""
supported_os="aarch64"
- HOST_CPU=aarch64;;
+ HOST_CPU=aarch64
+ ;;
+ sw64 | sw_64*)
+ CFLAGS="$CFLAGS -DCPU=\\\"sw_64\\\""
+ supported_os="sw_64"
+ HOST_CPU=sw_64;;
*)
echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6
diff --git a/src/native/unix/support/apsupport.m4 b/src/native/unix/support/apsupport.m4
index d9e94fb..b43ea86 100644
--- a/src/native/unix/support/apsupport.m4
+++ b/src/native/unix/support/apsupport.m4
@@ -178,6 +178,11 @@ AC_DEFUN(AP_SUPPORTED_HOST,[
CFLAGS="$CFLAGS -DCPU=\\\"aarch64\\\""
supported_os="aarch64"
HOST_CPU=aarch64;;
+ *)
+ sw64 | sw_64*)
+ CFLAGS="$CFLAGS -DCPU=\\\"sw_64\\\""
+ supported_os="sw_64"
+ HOST_CPU=sw_64;;
*)
AC_MSG_RESULT([failed])
AC_MSG_ERROR([Unsupported CPU architecture "$host_cpu"]);;
diff --git a/src/native/unix/support/config.guess b/src/native/unix/support/config.guess
index 6ea3454..19474d3 100755
--- a/src/native/unix/support/config.guess
+++ b/src/native/unix/support/config.guess
@@ -865,6 +865,9 @@ EOF
aarch64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ sw_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo ${UNAME_MACHINE}-unknown-linux-gnu
diff --git a/src/native/unix/support/config.sub b/src/native/unix/support/config.sub
index 26a0614..cd54017 100755
--- a/src/native/unix/support/config.sub
+++ b/src/native/unix/support/config.sub
@@ -248,6 +248,7 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | sw_64 | sw64 \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
--
2.33.0

View File

@ -1,6 +1,6 @@
Name: apache-commons-daemon Name: apache-commons-daemon
Version: 1.0.15 Version: 1.0.15
Release: 19 Release: 20
Summary: Defines API to support an alternative invocation mechanism Summary: Defines API to support an alternative invocation mechanism
License: ASL 2.0 License: ASL 2.0
URL: http://commons.apache.org/daemon URL: http://commons.apache.org/daemon
@ -13,6 +13,8 @@ Obsoletes: apache-commons-daemon-jsvc < %{version}-%{release}
Patch0001: apache-commons-daemon-JAVA_OS.patch Patch0001: apache-commons-daemon-JAVA_OS.patch
Patch0002: apache-commons-daemon-secondary.patch Patch0002: apache-commons-daemon-secondary.patch
Patch0003: apache-commons-daemon-aarch64.patch Patch0003: apache-commons-daemon-aarch64.patch
Patch0004: apache-commons-daemon-sw_64.patch
Patch0005: apache-commons-daemon-loongarch64.patch
%description %description
The scope of this package is to define an API in line with the current Java Platform APIs to support The scope of this package is to define an API in line with the current Java Platform APIs to support
@ -62,5 +64,8 @@ install -Dpm 644 src/native/unix/jsvc.1 $RPM_BUILD_ROOT%{_mandir}/man1/jsvc.1
%{_mandir}/man1/jsvc.1* %{_mandir}/man1/jsvc.1*
%changelog %changelog
* Mon Aug 7 2023 panchenbo <panchenbo@kylinsec.com.cn> - 1.0.15-20
- add support for loongarch64 sw_64
* Mon Dec 2 2019 liujing<liujing144@huawei.com> - 1.0.15-19 * Mon Dec 2 2019 liujing<liujing144@huawei.com> - 1.0.15-19
- Package init - Package init