From 90552bd5012f98e56e874afce6bf8fdc0cae52b5 Mon Sep 17 00:00:00 2001 From: "Austin S. Hemmelgarn" Date: Mon, 6 May 2024 07:05:34 -0400 Subject: Fix handling of vendored eBPF code in CMake. (#17556) * Fix logic error in CMake code for kernel version detection. * Force legacy libbpf for CentOS 7 and AL 2 package builds. * Check target kernel version instead of host kernel version. This should help when building in containers. * Fix up handling for older versions of CMake. * Use CMake C compiler for libbpf builds. * Fix selection of legacy eBPF code in static builds. * Explicitly pull in kernel headers on CentOS. * Fix typo in FORCE_LEGACY_LIBBPF option. * Only enable eBPF by default on x86. * Fix detection of static builds. * Fix libc detection logic. * Fix handling of static builds. * Fix musl libc detection. * Fix check messages for libc detection. --- netdata.spec.in | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'netdata.spec.in') diff --git a/netdata.spec.in b/netdata.spec.in index 4bfe2b1ae8..53e12b458b 100644 --- a/netdata.spec.in +++ b/netdata.spec.in @@ -332,6 +332,11 @@ happened, on your systems and applications. %endif %if %{_have_ebpf} -DENABLE_PLUGIN_EBPF=On \ + %if 0%{?centos_ver:1} + %if 0%{?centos_ver} < 8 + -DFORCE_LEGACY_LIBBPF=On \ + %endif + %endif %else -DENABLE_PLUGIN_EBPF=Off \ %endif -- cgit v1.2.3