From 7ff3e631419ef59dd2c8f163cf1a3e534e118079 Mon Sep 17 00:00:00 2001 From: Lang Daniel Date: Wed, 15 Feb 2023 09:58:39 +0000 Subject: [PATCH] package/libbpf: Don't remove bpf.h libbpf >1.0.0 defines libbpf_bpf_link_type_str(enum bpf_link_type) in src/libbpf.h, which is included by host-pahole. bpf_link_type is defined in linux/bpf.h, therefore the comment stating that pahole doesn't need bpf.h is no longer valid. The original reason to remove bpf.h has been solved with the previous commit: the linux build will prefer the internal bpf.h over the one in HOST_DIR (or in /usr/include). So we can safely keep bpf.h. Fixes: - http://autobuild.buildroot.net/results/d126a4b6eca786402dc362c86f8df3addec3d217/ Signed-off-by: Daniel Lang Signed-off-by: Arnout Vandecappelle --- package/libbpf/libbpf.mk | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/package/libbpf/libbpf.mk b/package/libbpf/libbpf.mk index b498136ace..670dbee87e 100644 --- a/package/libbpf/libbpf.mk +++ b/package/libbpf/libbpf.mk @@ -39,26 +39,9 @@ define LIBBPF_INSTALL_TARGET_CMDS -C $(@D)/src install DESTDIR=$(TARGET_DIR) endef -# We need to install_uapi_headers so we have btf.h to compile -# host-pahole. -# Nonetheless, this target adds bpf.h which generates a conflict when -# building the kernel: -# In file included from libbpf_internal.h:17:0, from strset.c:9: -# relo_core.h:10:6: error: nested redefinition of 'enum bpf_core_relo_kind' -# enum bpf_core_relo_kind { -# ^~~~~~~~~~~~~~~~~~ -# relo_core.h:10:6: error: redeclaration of 'enum bpf_core_relo_kind' -# In file included from libbpf_legacy.h:13:0, -# from libbpf_internal.h:16, -# from strset.c:9: -# /home/francis/buildroot/output/host/include/linux/bpf.h:6497:6: note: originally defined here -# enum bpf_core_relo_kind { -# So, better to remove remove it now since we do not need it to build -# host-pahole, the only user of host-libbpf. define HOST_LIBBPF_INSTALL_CMDS $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) \ -C $(@D)/src install install_uapi_headers DESTDIR=$(HOST_DIR) - rm $(HOST_DIR)/include/linux/bpf.h endef $(eval $(generic-package))