]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: preload: Install libbpf headers when building
authorQuentin Monnet <quentin@isovalent.com>
Thu, 7 Oct 2021 19:44:32 +0000 (20:44 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 8 Oct 2021 18:56:42 +0000 (11:56 -0700)
commitb64da22ff18be01e73aac0891336b9533e8ae4d9
treef8feaadd5a15ee7e4ea591a705b85881b32a758b
parente0d739b13eae598d8f807a172f4ef8bc4d72f62e
bpf: preload: Install libbpf headers when building

API headers from libbpf should not be accessed directly from the
library's source directory. Instead, they should be exported with "make
install_headers". Let's make sure that bpf/preload/Makefile installs the
headers properly when building.

Note that we declare an additional dependency for iterators/iterators.o:
having $(LIBBPF_A) as a dependency to "$(obj)/bpf_preload_umd" is not
sufficient, as it makes it required only at the linking step. But we
need libbpf to be compiled, and in particular its headers to be
exported, before we attempt to compile iterators.o. The issue would not
occur before this commit, because libbpf's headers were not exported and
were always available under tools/lib/bpf.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211007194438.34443-7-quentin@isovalent.com
kernel/bpf/preload/Makefile