]> git.baikalelectronics.ru Git - kernel.git/commit
tools/bpftool: Fix cross-build
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Tue, 10 Nov 2020 16:43:07 +0000 (17:43 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 11 Nov 2020 20:18:22 +0000 (12:18 -0800)
commit4e590bba2ca3609dddad6f0b57315710f9c13bf2
treed62b977c015fd0f00d5fce2ba455d62a0b2b76d0
parent26223ba71947ac5681c78dd9baff5bd1d0c786a8
tools/bpftool: Fix cross-build

The bpftool build first creates an intermediate binary, executed on the
host, to generate skeletons required by the final build. When
cross-building bpftool for an architecture different from the host, the
intermediate binary should be built using the host compiler (gcc) and
the final bpftool using the cross compiler (e.g. aarch64-linux-gnu-gcc).

Generate the intermediate objects into the bootstrap/ directory using
the host toolchain.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201110164310.2600671-4-jean-philippe@linaro.org
tools/bpf/bpftool/Makefile