apache-commons-daemon/apache-commons-daemon-sw_64.patch
panchenbo 39f21af1b1 add support for loongarch64 sw_64
(cherry picked from commit e5676fb9a828df7232f3687a218d4091f5a49cf3)
2023-09-21 13:57:51 +08:00

76 lines
2.5 KiB
Diff

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