From 8ee21e06033489e57a97c179155fcf070a466d47 Mon Sep 17 00:00:00 2001 From: lf14 Date: Sun, 4 Feb 2024 20:45:58 +0800 Subject: [PATCH] support clang build --- systemtap.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/systemtap.spec b/systemtap.spec index a74c0af..5ba5891 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -22,7 +22,7 @@ Name: systemtap Version: 5.0 -Release: 1 +Release: 2 Summary: Linux trace and probe tool License: GPLv2+ and Public Domain URL: http://sourceware.org/systemtap @@ -186,6 +186,12 @@ This package include systemtap manual %autosetup -p1 %build +%if "%{?toolchain}" == "clang" + CFLAGS="${CFLAGS:-%{?build_cflags}} -Wno-error=overloaded-virtual -Wno-error=inconsistent-missing-override -Wno-error=absolute-value -Wno-error=return-type -Wno-error=deprecated-copy-with-user-provided-copy -Wno-error=format-nonliteral -Wno-error=deprecated-copy -Wno-error=ignored-attributes -Wno-error=unused-but-set-variable"; export CFLAGS; + CXXFLAGS="${CXXFLAGS:-%{?build_cxxflags}} -Wno-error=overloaded-virtual -Wno-error=inconsistent-missing-override -Wno-error=absolute-value -Wno-error=return-type -Wno-error=deprecated-copy-with-user-provided-copy -Wno-error=format-nonliteral -Wno-error=deprecated-copy -Wno-error=ignored-attributes -Wno-error=unused-but-set-variable" ; export CXXFLAGS; + LDFLAGS="${LDFLAGS:-%{?build_ldflags}}" ; export LDFLAGS=`echo $LDFLAGS | sed 's/-fno-openmp-implicit-rpath//g'` +%endif + %configure \ %{dyninst_config} \ %{crash_config} \ @@ -477,6 +483,12 @@ exit 0 %{_mandir}/man[1378]/* %changelog +* Sun Feb 4 2024 luofeng - 5.0-2 +- Type:enhencement +- CVE:NA +- SUG:NA +- DESC:support clang build + * Wed Jan 24 2024 liuchao - 5.0-1 - Upgrade to 5.0: - Performance improvements in uprobe registration and module startup. -- Gitee