ltrace/add-loongarch-support-not-upstream-makefile.patch
herengui bbf7514c0e 添加龙芯和申威架构支持
Signed-off-by: herengui <herengui@kylinsec.com.cn>
(cherry picked from commit 3e9aabe1d36c022487c490439602193596a37aa0)
2023-09-06 14:56:03 +08:00

58 lines
1.9 KiB
Diff

From 9df559fef66ab738a968367c12fcf5982c89a2f7 Mon Sep 17 00:00:00 2001
From: herengui <herengui@kylinsec.com.cn>
Date: Tue, 29 Aug 2023 09:25:34 +0800
Subject: [PATCH 1/2] add loongarch support not upstream makefile
Signed-off-by: herengui <herengui@kylinsec.com.cn>
---
configure.ac | 3 +++
sysdeps/linux-gnu/Makefile.am | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 63fd950..205457e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,7 @@ case "${host_cpu}" in
arm*|sa110) HOST_CPU="arm" ;;
aarch64_be) HOST_CPU="aarch64" ;;
cris*) HOST_CPU="cris" ;;
+ loongarch*) HOST_CPU="loongarch" ;;
mips*) HOST_CPU="mips" ;;
powerpc|powerpc64) HOST_CPU="ppc" ;;
sun4u|sparc64) HOST_CPU="sparc" ;;
@@ -216,6 +217,7 @@ if test x"$enable_libunwind" = xyes; then
powerpc) UNWIND_ARCH="ppc32" ;;
powerpc64) UNWIND_ARCH="ppc64" ;;
mips*) UNWIND_ARCH="mips" ;;
+ loongarch*) UNWIND_ARCH="loongarch" ;;
*) UNWIND_ARCH="${host_cpu}" ;;
esac
@@ -405,6 +407,7 @@ AC_CONFIG_FILES([
sysdeps/linux-gnu/arm/Makefile
sysdeps/linux-gnu/cris/Makefile
sysdeps/linux-gnu/ia64/Makefile
+ sysdeps/linux-gnu/loongarch/Makefile
sysdeps/linux-gnu/m68k/Makefile
sysdeps/linux-gnu/metag/Makefile
sysdeps/linux-gnu/mips/Makefile
diff --git a/sysdeps/linux-gnu/Makefile.am b/sysdeps/linux-gnu/Makefile.am
index ec26162..7d17020 100644
--- a/sysdeps/linux-gnu/Makefile.am
+++ b/sysdeps/linux-gnu/Makefile.am
@@ -17,8 +17,8 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
-DIST_SUBDIRS = aarch64 alpha arm cris ia64 m68k metag mips ppc s390 \
- sparc x86
+DIST_SUBDIRS = aarch64 alpha arm cris ia64 loongarch m68k metag mips \
+ ppc s390 sparc x86
SUBDIRS = \
$(HOST_CPU)
--
2.41.0