]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Fix cross-compiling error by using bootstrap bpftool
authorPu Lehui <pulehui@huawei.com>
Thu, 14 Jul 2022 02:46:10 +0000 (10:46 +0800)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 15 Jul 2022 19:01:30 +0000 (12:01 -0700)
commit787686ffd99fc1d95ff8361ba00aaa16e129a62d
tree8b3d676720d372bc3f91f7161dd7b9efc550fb50
parentfb26e42838a4018f0945cb5132dab08835996261
samples: bpf: Fix cross-compiling error by using bootstrap bpftool

Currently, when cross compiling bpf samples, the host side cannot
use arch-specific bpftool to generate vmlinux.h or skeleton. Since
samples/bpf use bpftool for vmlinux.h, skeleton, and static linking
only, we can use lightweight bootstrap version of bpftool to handle
these, and it's always host-native.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220714024612.944071-2-pulehui@huawei.com
samples/bpf/Makefile