From 0918a21b806ffa1af793e2128ab4c7654585b18f Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Jun 29 2023 16:42:09 +0000 Subject: Only use CORESIGHT=1 on hs.el9 and above Signed-off-by: Michel Alexandre Salim --- diff --git a/kernel-tools.spec b/kernel-tools.spec index 93e3a52..7bbfa7c 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -262,9 +262,13 @@ pathfix.py -pni "%{__python3} %{py3_shbang_opts}" tools/ tools/perf/scripts/pyth cd linux-%{kversion} +%if 0%{?rhel} && 0%{?rhel} >= 9 +# can't use CORESIGHT=1 on hs.el8: +# Makefile.config:518: *** Error: No libopencsd library found or the version is not up-to-date. Please install recent libopencsd to build with CORESIGHT=1. Stop. %ifarch aarch64 %global perf_build_extra_opts CORESIGHT=1 %endif +%endif %global perf_make \ make %{?make_opts} EXTRA_CFLAGS="${RPM_OPT_FLAGS}" LDFLAGS="%{__global_ldflags}" %{?cross_opts} -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 LIBTRACEEVENT_DYNAMIC=1 %{?perf_build_extra_opts} prefix=%{_prefix} PYTHON=%{__python3}