[PATCH] kernel.spec: enable building of perf with libnuma support

Petr Holasek pholasek at redhat.com
Thu Oct 23 16:51:50 UTC 2014


Patch makes perf package dependent on numactl-devel and so enables numa
subsystem benchmarks for perf bench command. numactl-devel is added to the
buildroot just for x86 archs, because we don't ship libnuma for any others
architectures.

Can be easily reproduced by calling 'perf bench numa mem -a':

- current output:

'Unknown subsystem:numa'

- built with this patch:

'Running numa/mem benchmark...'

Signed-off-by: Petr Holasek <pholasek at redhat.com>
---
 kernel.spec | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/kernel.spec b/kernel.spec
index 838712d..6a2a04c 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -386,6 +386,9 @@ BuildRequires: sparse
 %if %{with_perf}
 BuildRequires: elfutils-devel zlib-devel binutils-devel newt-devel python-devel perl(ExtUtils::Embed) bison flex
 BuildRequires: audit-libs-devel
+%ifarch %{ix86} x86_64
+BuildRequires: numactl-devel
+%endif
 %endif
 %if %{with_tools}
 BuildRequires: pciutils-devel gettext ncurses-devel
@@ -1754,7 +1757,7 @@ BuildKernel %make_target %kernel_image
 %endif
 
 %global perf_make \
-  make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_LIBNUMA=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix}
+  make -s %{?cross_opts} %{?_smp_mflags} -C tools/perf V=1 WERROR=0 NO_LIBUNWIND=1 HAVE_CPLUS_DEMANGLE=1 NO_GTK2=1 NO_STRLCPY=1 NO_BIONIC=1 prefix=%{_prefix}
 %if %{with_perf}
 # perf
 %{perf_make} DESTDIR=$RPM_BUILD_ROOT all
-- 
1.9.3



More information about the kernel mailing list