From 83b5f15bae2ada49397b20d25097c8b69c1a121a Mon Sep 17 00:00:00 2001 From: Ruidong Tian Date: Mon, 27 Feb 2023 17:25:47 +0800 Subject: [PATCH] spec: build perf with Coresight just on aarch64 an8.8 x86 do not have opencsd package. Just build perf with Coresight on aarch64. Signed-off-by: Ruidong Tian --- kernel.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index 6d4eaec..b212ffc 100644 --- a/kernel.spec +++ b/kernel.spec @@ -198,8 +198,10 @@ BuildRequires: sparse BuildRequires: zlib-devel binutils-devel newt-devel perl(ExtUtils::Embed) bison flex xz-devel BuildRequires: audit-libs-devel BuildRequires: java-devel +%ifarch aarch64 BuildRequires: opencsd BuildRequires: opencsd-devel +%endif %ifnarch s390x BuildRequires: numactl-devel %endif @@ -354,7 +356,9 @@ It provides the kernel source files common to all builds. Summary: Performance monitoring for the Linux kernel Group: Development/System Requires: bzip2 +%ifarch aarch64 Requires: opencsd +%endif License: GPLv2 %description -n perf This package contains the perf tool, which enables performance monitoring @@ -1195,8 +1199,14 @@ BuildKernel %make_target %kernel_image debug BuildKernel %make_target %kernel_image %endif +%ifarch aarch64 +%define perf_coresight CORESIGHT=1 +%else +%define perf_coresight CORESIGHT=0 +%endif + %global perf_make \ - make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 CORESIGHT=1 prefix=%{_prefix} PYTHON=%{__python3} + make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" -C tools/perf V=1 NO_PERF_READ_VDSO32=1 NO_PERF_READ_VDSOX32=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 %{perf_coresight} prefix=%{_prefix} PYTHON=%{__python3} %if %{with_perf} # perf # make sure check-headers.sh is executable -- Gitee