diff --git a/systemtap-4.9-Introduce-sw-macors-to-avoid-build-failures.patch b/systemtap-4.9-Introduce-sw-macors-to-avoid-build-failures.patch new file mode 100644 index 0000000000000000000000000000000000000000..e8c7ba583fefcad09bfad46e8121e94988032e47 --- /dev/null +++ b/systemtap-4.9-Introduce-sw-macors-to-avoid-build-failures.patch @@ -0,0 +1,46 @@ +From 0ddb1830a2075ae79e54f36622d1f8e96859c886 Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Fri, 8 Nov 2024 14:43:13 +0800 +Subject: [PATCH] Introduce sw macors to avoid build failures. + +Signed-off-by: Weisson +--- + sw-macros.h | 10 ++++++++++ + tapsets.cxx | 4 ++++ + 2 files changed, 14 insertions(+) + create mode 100644 sw-macros.h + +diff --git a/sw-macros.h b/sw-macros.h +new file mode 100644 +index 0000000..acaffdd +--- /dev/null ++++ b/sw-macros.h +@@ -0,0 +1,10 @@ ++#ifndef __SW_MACRO_H_ ++#define __SW_MACRO_H_ ++ ++#ifndef SW_64 ++#define EM_SW_64 0x9916 ++#else ++#define EM_SW_64 0x9906 ++#endif /* SW_64 */ ++ ++#endif /* __SW_MACRO_H_ */ +diff --git a/tapsets.cxx b/tapsets.cxx +index 9fef1b5..3216d93 100644 +--- a/tapsets.cxx ++++ b/tapsets.cxx +@@ -68,6 +68,10 @@ extern "C" { + using namespace std; + using namespace __gnu_cxx; + ++#ifndef EM_SW_64 ++#include "sw-macros.h" ++#endif ++ + // for elf.h where PPC64_LOCAL_ENTRY_OFFSET isn't defined + #ifndef PPC64_LOCAL_ENTRY_OFFSET + #define STO_PPC64_LOCAL_BIT 5 +-- +2.39.3 + diff --git a/systemtap.spec b/systemtap.spec index 10f67b8b1b3927c04572bdce83d0c20f821ca0b6..65b4b7f51c9a85979b464302a510b937d6f1e789 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.3 +%define anolis_release .0.4 %{!?with_sqlite: %global with_sqlite 0%{?fedora} >= 17 || 0%{?rhel} >= 7} # prefer prebuilt docs %{!?with_docs: %global with_docs 0} @@ -168,6 +168,7 @@ Patch4: pr30749.patch Patch10: 0001-add-loongarch-support-for-systemtap.patch Patch11: systemtap-4.9-sw.patch +Patch12: systemtap-4.9-Introduce-sw-macors-to-avoid-build-failures.patch # Build* BuildRequires: make @@ -604,6 +605,7 @@ or within a container. %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build @@ -1323,6 +1325,9 @@ exit 0 # PRERELEASE %changelog +* Fri Nov 8 2024 Weisson - 4.9-3.0.4 +- Introduce sw macors to avoid build failures. + * Thu Aug 15 2024 wxiat - 4.9-3.0.3 - change sw arch patch to 4.9