From 2ff7dcf29dffb9dd42a3031313d9a1f1e29c3558 Mon Sep 17 00:00:00 2001 From: ebasov Date: Wed, 12 Feb 2025 21:02:23 +0300 Subject: [PATCH] Fix build for noarch and x86_64 --- SPECS/kernel-6.1.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SPECS/kernel-6.1.spec b/SPECS/kernel-6.1.spec index ecf8f8e..aa24684 100644 --- a/SPECS/kernel-6.1.spec +++ b/SPECS/kernel-6.1.spec @@ -1295,8 +1295,13 @@ popd > /dev/null %endif %if %{with_bpftool} +%ifarch aarch64 %global bpftool_make \ %{__make} -s EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" +%else +%global bpftool_make \ + %{__make} -s EXTRA_CFLAGS="-O2 -Wall -Wextra -Werror" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" +%endif pushd tools/bpf/bpftool > /dev/null %{bpftool_make} @@ -1465,6 +1470,7 @@ popd > /dev/null ### ### Scripts. ### +%ifarch x86_64 aarch64 %if %{with_tools} %post -n %{name}-tools-libs /sbin/ldconfig @@ -1472,6 +1478,7 @@ popd > /dev/null %postun -n %{name}-tools-libs /sbin/ldconfig %endif +%endif # # This macro defines a %%post script for a kernel-lt*-devel package. @@ -1612,6 +1619,7 @@ fi %{python3_sitearch}/* %endif +%ifarch x86_64 aarch64 %if %{with_tools} %files -n %{name}-tools -f cpupower.lang %{_bindir}/cpupower @@ -1652,6 +1660,7 @@ fi %files -n %{name}-tools-libs-devel %{_libdir}/libcpupower.so %endif +%endif %if %{with_bpftool} %files -n bpftool