diff --git a/0002-add-riscv64-support-for-systemtap.patch b/0002-add-riscv64-support-for-systemtap.patch new file mode 100644 index 0000000000000000000000000000000000000000..dfb4a5f14a9b18464951ecdb90b6992c01ba11c0 --- /dev/null +++ b/0002-add-riscv64-support-for-systemtap.patch @@ -0,0 +1,25 @@ +diff --git a/staplog.c b/staplog.c + +--- 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(RISCV64) + + #if defined(__alpha__) + #define ALPHA +@@ -46,6 +46,8 @@ + #define ARM64 + #elif defined(__arm__) + #define ARM ++#elif defined(__riscv) && (__riscv_xlen == 64) ++#define RISCV64 + #else + #warn "unknown architecture for crash/staplog support" + #endif +-- +2.41.0 + diff --git a/systemtap.spec b/systemtap.spec index f4c73c7e79751ec0a335536f2bea327b54c06840..3a98dd0be27893ef3fda7bdd948e104a98934c56 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1,11 +1,11 @@ -%define anolis_release 4 +%define anolis_release 5 %bcond_without rpm %bcond_without bpf %bcond_without crash %bcond_without dracut %bcond_without sqlite %bcond_without monitor -%ifarch loongarch64 +%ifarch loongarch64 riscv64 %bcond_with dyninst %else %bcond_without dyninst @@ -115,6 +115,7 @@ 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 +Patch002: 0002-add-riscv64-support-for-systemtap.patch # Build* BuildRequires: make gcc-c++ @@ -539,7 +540,14 @@ systemtap-runtime-virthost machine to execute systemtap scripts. # ------------------------------------------------------------------------ %prep -%autosetup -p1 +%autosetup -N +%ifarch loongarch64 +%patch -P1 -p1 +%endif + +%ifarch riscv64 +%patch -P2 -p1 +%endif %build @@ -1232,7 +1240,10 @@ exit 0 # ------------------------------------------------------------------------ %changelog -* Fri Nov 3 2023 Wenlong Zhang - 4.8-4 +* Sun Nov 5 2023 Guoguo - 4.8-5 +- disable dyninst for riscv64 + +* Fri Nov 3 2023 Wenlong Zhang - 4.8-4 - disable dyninst for loongarch64 * Fri Apr 14 2023 Xuchun Shang - 4.8-3