From 5f91e0455c6e508bd4a6a4368a88fbca917dbdcd Mon Sep 17 00:00:00 2001 From: Justin M. Forbes Date: Jul 20 2021 15:40:46 +0000 Subject: Pull back the vmlinux.h bit until I can come up with a better solution Signed-off-by: Justin M. Forbes --- diff --git a/kernel-tools.spec b/kernel-tools.spec index eacc8fb..2bc6a7b 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -75,10 +75,6 @@ BuildRequires: asciidoc xmlto libcap-devel BuildRequires: opencsd-devel openssl-devel libbabeltrace-devel libtraceevent-devel BuildRequires: libbpf-devel BuildRequires: clang llvm -# bpftool will look for a matching vmlinux.h here -%ifnarch i686 armvv7hl -BuildRequires: kernel-devel -%endif # Used to mangle unversioned shebangs to be Python 3 BuildRequires: /usr/bin/pathfix.py %ifnarch s390x %{arm} @@ -276,18 +272,8 @@ pushd tools/gpio/ %{tools_make} popd -# This is a bit messy, but if we have a kernel-devel installed from this version, and it includes a vmlinux.h -# we want to use that. Otherwise, we need to pass an empty so it will generate one from the running kernel. -%ifnarch i686 armv7hl -develpackage=$(rpm -qa | grep "kernel-devel" | grep %{kversion}) -vmlinux_h=$(rpm -ql $develpackage | grep vmlinux.h) -if [ -f $vmlinux_h ]; then - RPM_VMLINUX_H=$vmlinux_h -fi -%endif - %global bpftool_make \ - make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT VMLINUX_H="${RPM_VMLINUX_H}" V=1 + make EXTRA_CFLAGS="${RPM_OPT_FLAGS}" EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1 pushd tools/bpf/bpftool %{bpftool_make}