diff --git a/0001-add-loongarch64-support-for-systemtap.patch b/0001-add-loongarch64-support-for-systemtap.patch new file mode 100644 index 0000000000000000000000000000000000000000..e86127e8d8ff59df6cd1d91082b81d2beaabf218 --- /dev/null +++ b/0001-add-loongarch64-support-for-systemtap.patch @@ -0,0 +1,34 @@ +From 1e8526f863bcc8924bdd681e148e1b5c8f6e3105 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Fri, 3 Nov 2023 06:59:21 +0000 +Subject: [PATCH] add loongarch64 support for systemtap + +--- + staplog.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/staplog.c b/staplog.c +index a0b468e..6335b39 100644 +--- a/staplog.c ++++ b/staplog.c +@@ -24,7 +24,7 @@ + X86, X86_64, etc. See crash/configure.c (!). */ + #if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(PPC) && \ + !defined(IA64) && !defined(PPC64) && !defined(S390) && !defined(S390X) && \ +- !defined(ARM) && !defined(ARM64) ++ !defined(ARM) && !defined(ARM64) && !defined(LOONGARCH64) + + #if defined(__alpha__) + #define ALPHA +@@ -46,6 +46,8 @@ + #define ARM64 + #elif defined(__arm__) + #define ARM ++#elif defined(__loongarch64) ++#define LOONGARCH64 + #else + #warn "unknown architecture for crash/staplog support" + #endif +-- +2.41.0 + diff --git a/systemtap.spec b/systemtap.spec index cb4caeac85ad2bf7e98751e96d83b032e1f490ff..f4c73c7e79751ec0a335536f2bea327b54c06840 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1,11 +1,15 @@ -%define anolis_release 3 +%define anolis_release 4 %bcond_without rpm %bcond_without bpf %bcond_without crash %bcond_without dracut %bcond_without sqlite %bcond_without monitor +%ifarch loongarch64 +%bcond_with dyninst +%else %bcond_without dyninst +%endif %bcond_without systemd %bcond_without python3 %bcond_without emacsvim @@ -110,6 +114,7 @@ Summary: Programmable system-wide instrumentation system License: GPLv2+ URL: http://sourceware.org/systemtap/ Source: https://sourceware.org/ftp/systemtap/releases/%{name}-%{version}.tar.gz +Patch001: 0001-add-loongarch64-support-for-systemtap.patch # Build* BuildRequires: make gcc-c++ @@ -1227,6 +1232,9 @@ exit 0 # ------------------------------------------------------------------------ %changelog +* Fri Nov 3 2023 Wenlong Zhang - 4.8-4 +- disable dyninst for loongarch64 + * Fri Apr 14 2023 Xuchun Shang - 4.8-3 - Update the description