diff --git a/systemtap-4.5-sw.patch b/systemtap-4.5-sw.patch new file mode 100755 index 0000000..55f4745 --- /dev/null +++ b/systemtap-4.5-sw.patch @@ -0,0 +1,31 @@ +diff -Naur systemtap-4.5.org/m4/intdiv0.m4 systemtap-4.5.sw/m4/intdiv0.m4 +--- systemtap-4.5.org/m4/intdiv0.m4 2022-02-26 07:18:18.530000000 +0000 ++++ systemtap-4.5.sw/m4/intdiv0.m4 2022-02-26 07:21:23.240000000 +0000 +@@ -69,7 +69,7 @@ + # Guess based on the CPU. + changequote(,)dnl + case "$host_cpu" in +- alpha* | i[34567]86 | x86_64 | m68k | s390*) ++ sw_64* | alpha* | i[34567]86 | x86_64 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; +diff -Naur systemtap-4.5.org/staplog.c systemtap-4.5.sw/staplog.c +--- systemtap-4.5.org/staplog.c 2022-02-26 07:18:18.510000000 +0000 ++++ systemtap-4.5.sw/staplog.c 2022-02-26 07:22:44.880000000 +0000 +@@ -22,12 +22,14 @@ + + /* crash/defs.h defines NR_CPUS based upon architecture macros + X86, X86_64, etc. See crash/configure.c (!). */ +-#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(PPC) && \ ++#if !defined(X86) && !defined(X86_64) && !defined(ALPHA) && !defined(SW_64) && !defined(PPC) && \ + !defined(IA64) && !defined(PPC64) && !defined(S390) && !defined(S390X) && \ + !defined(ARM) && !defined(ARM64) + + #if defined(__alpha__) + #define ALPHA ++#elif defined(__sw_64__) ++#define SW_64 + #elif defined(__x86_64__) + #define X86_64 + #elif defined(__i386__) diff --git a/systemtap.spec b/systemtap.spec index 673bf14..30be426 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -22,13 +22,14 @@ Name: systemtap Version: 4.5 -Release: 3 +Release: 4 Summary: Linux trace and probe tool License: GPLv2+ and Public Domain URL: http://sourceware.org/systemtap Source: https://sourceware.org/systemtap/ftp/releases/%{name}-%{version}.tar.gz Patch1: 0001-Add-init-type-cast-to-resolve-gcc-issue.patch +Patch2: systemtap-4.5-sw.patch BuildRequires: gcc-c++ emacs systemd python3-setuptools BuildRequires: gettext-devel rpm-devel readline-devel @@ -181,7 +182,9 @@ This package include systemtap manual --with-dracutstap=%{dracutstap} \ --with-dracutbindir=%{dracutbindir} \ --with-python3 \ +%ifnarch sw_64 --with-python3-probes \ +%endif --enable-pie \ --with-rpm \ --enable-sqlite \ @@ -254,7 +257,9 @@ install -p -m 755 initscript/99stap/start-staprun.sh $RPM_BUILD_ROOT%{dracutstap touch $RPM_BUILD_ROOT%{dracutstap}/params.conf mkdir -p $RPM_BUILD_ROOT/stap-exporter +%ifnarch sw_64 install -p -m 755 stap-exporter/stap-exporter $RPM_BUILD_ROOT%{_bindir} +%endif install -m 644 stap-exporter/stap-exporter.service $RPM_BUILD_ROOT%{_unitdir} install -m 644 stap-exporter/stap-exporter.8* $RPM_BUILD_ROOT%{_mandir}/man8 @@ -392,7 +397,9 @@ exit 0 %{_emacs_sitelispdir}/*.el* %{_emacs_sitestartdir}/systemtap-init.el %{_datadir}/vim/vimfiles/*/*.vim +%ifnarch sw_64 %{_libexecdir}/systemtap/python/stap-resolve-module-function.py +%endif %files runtime -f systemtap.lang %defattr(-,root,root) @@ -439,20 +446,27 @@ exit 0 %{_datadir}/systemtap/testsuite %files runtime-python3 +%ifnarch sw_64 %{python3_sitearch}/HelperSDT %{python3_sitearch}/HelperSDT-*.egg-info +%endif %files stap-exporter %{_unitdir}/stap-exporter.service +%ifnarch sw_64 %{_bindir}/stap-exporter /etc/stap-exporter/* /usr/sbin/stap-exporter /etc/sysconfig/stap-exporter +%endif %files help %{_mandir}/man[1378]/* %changelog +* Thu Oct 27 2022 wuzx - 4.5-4 +- Add sw64 architecture + * Mon Jun 20 2022 zhouwenpei - 4.5-3 - Remove requires on gcc and systemtap-devel