From 9105445398c6ec8d7247f1a2333a1f7c3a77e72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20Hoffst=C3=A4tte?= Date: Tue, 26 Nov 2024 12:59:43 +0100 Subject: [PATCH] Do not generate uapi header when using external libbpf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This creates unnecessary header confusion and valid complaints e.g. when building with LTO. One could argue that there could be an explicit version check for whatever libbpf version bcc needs, but silently trying to be helpful by doing something else is pretty much wrong. This is one part of fixing #5091 Signed-off-by: Holger Hoffstätte --- src/cc/CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt index 104eff0e656b..486bedcb0d25 100644 --- a/src/cc/CMakeLists.txt +++ b/src/cc/CMakeLists.txt @@ -18,12 +18,6 @@ endif (LIBDEBUGINFOD_FOUND AND ENABLE_LIBDEBUGINFOD) # todo: if check for kernel version if (CMAKE_USE_LIBBPF_PACKAGE AND LIBBPF_FOUND) include_directories(${LIBBPF_INCLUDE_DIRS}) - # create up-to-date linux/bpf.h from virtual_bpf.h (remove string wrapper); - # when libbpf is built as a submodule we use its version of linux/bpf.h - # so this does similar for the libbpf package, removing reliance on the - # system uapi header which can be out of date. - execute_process(COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}/compat/linux && grep -ve '\\*\\*\\*\\*' virtual_bpf.h > bpf.h") - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/compat) else() include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/libbpf/include/uapi)