linux/tools/bpf/resolve_btfids
Jean-Philippe Brucker bf1be90346 tools/resolve_btfids: Support cross-building the kernel with clang
The CROSS_COMPILE variable may be present during resolve_btfids build if
the kernel is being cross-built. Since resolve_btfids is always executed
on the host, we set CC to HOSTCC in order to use the host toolchain when
cross-building with GCC. But instead of a toolchain prefix, cross-build
with clang uses a "-target" parameter, which Makefile.include deduces
from the CROSS_COMPILE variable. In order to avoid cross-building
libbpf, clear CROSS_COMPILE before building resolve_btfids.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20211216163842.829836-3-jean-philippe@linaro.org
2021-12-16 12:15:04 -08:00
..
.gitignore tools/resolve_btfids: Add /libbpf to .gitignore 2021-02-12 13:08:26 -08:00
Build bpf: Add resolve_btfids tool to resolve BTF IDs in ELF object 2020-07-13 10:42:02 -07:00
main.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2021-12-10 15:56:13 -08:00
Makefile tools/resolve_btfids: Support cross-building the kernel with clang 2021-12-16 12:15:04 -08:00