Support for specified CC
(cherry picked from commit b6e518e1a310e63051f4643fdc0a0d0db08cb3ee)
This commit is contained in:
parent
09ceeb39b6
commit
a6bb7644c8
11
fix-check-static-when-build-by-clang.patch
Normal file
11
fix-check-static-when-build-by-clang.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -Nur a/src/libpcp/src/check-statics b/src/libpcp/src/check-statics
|
||||||
|
--- a/src/libpcp/src/check-statics 2024-09-03 16:45:00.384830188 +0800
|
||||||
|
+++ b/src/libpcp/src/check-statics 2024-09-03 16:46:04.184830354 +0800
|
||||||
|
@@ -254,6 +254,7 @@
|
||||||
|
?__emutls_v.curcontext # thread private (*BSD, MinGW)
|
||||||
|
?__emutls_t.curr_ctxp # thread private (*BSD, MinGW)
|
||||||
|
?__emutls_t.curr_handle # thread private (*BSD, MinGW)
|
||||||
|
+ __pmDumpContext # llvm
|
||||||
|
|
||||||
|
derive_fetch.o
|
||||||
|
?promote # const
|
||||||
16
pcp.spec
16
pcp.spec
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
Name: pcp
|
Name: pcp
|
||||||
Version: 6.2.2
|
Version: 6.2.2
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: System-level performance monitoring and performance management
|
Summary: System-level performance monitoring and performance management
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
|
||||||
URL: https://pcp.io
|
URL: https://pcp.io
|
||||||
|
|
||||||
Source0: https://github.com/performancecopilot/pcp/archive/refs/tags/%{version}.tar.gz
|
Source0: https://github.com/performancecopilot/pcp/archive/refs/tags/%{version}.tar.gz
|
||||||
|
Patch0: fix-check-static-when-build-by-clang.patch
|
||||||
|
|
||||||
# The additional linker flags break out-of-tree PMDAs.
|
# The additional linker flags break out-of-tree PMDAs.
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2043092
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2043092
|
||||||
@ -2095,7 +2096,10 @@ updated policy package.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%setup -q
|
||||||
|
%if "%{?toolchain}" == "clang"
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step)
|
# the buildsubdir macro gets defined in %%setup and is apparently only available in the next step (i.e. the %%build step)
|
||||||
@ -2106,7 +2110,10 @@ _build=`echo %{release} | sed -e 's/\..*$//'`
|
|||||||
sed -i "/PACKAGE_BUILD/s/=[0-9]*/=$_build/" VERSION.pcp
|
sed -i "/PACKAGE_BUILD/s/=[0-9]*/=$_build/" VERSION.pcp
|
||||||
|
|
||||||
export PYTHON=python%{?default_python}
|
export PYTHON=python%{?default_python}
|
||||||
%configure %{?_with_initd} %{?_with_doc} %{?_with_dstat} %{?_with_ib} %{?_with_statsd} %{?_with_perfevent} %{?_with_bcc} %{?_with_bpf} %{?_with_bpftrace} %{?_with_json} %{?_with_mongodb} %{?_with_snmp} %{?_with_nutcracker} %{?_with_python2}
|
%if "%{?toolchain}" == "clang"
|
||||||
|
export HOSTCC=clang
|
||||||
|
%endif
|
||||||
|
%configure %{?_with_initd} %{?_with_doc} %{?_with_dstat} %{?_with_ib} %{?_with_statsd} %{?_with_perfevent} %{?_with_bcc} %{?_with_bpf} %{?_with_bpftrace} %{?_with_json} %{?_with_mongodb} %{?_with_snmp} %{?_with_nutcracker} %{?_with_python3}
|
||||||
make %{?_smp_mflags} default_pcp
|
make %{?_smp_mflags} default_pcp
|
||||||
|
|
||||||
pushd src/pmdas/bpf/modules
|
pushd src/pmdas/bpf/modules
|
||||||
@ -3178,6 +3185,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 03 2024 wangqiang <wangqiang1@kylinos.cn> - 6.2.2-3
|
||||||
|
- Support to build with clang
|
||||||
|
|
||||||
* Wed Jun 05 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 6.2.2-2
|
* Wed Jun 05 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 6.2.2-2
|
||||||
- fix build error for loongarch64
|
- fix build error for loongarch64
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user