]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Enable cross-building with clang
authorJean-Philippe Brucker <jean-philippe@linaro.org>
Thu, 16 Dec 2021 16:38:43 +0000 (16:38 +0000)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 16 Dec 2021 20:15:05 +0000 (12:15 -0800)
commit268669ab7b14d32b73096b507dace5e4f1a8f3d9
tree66fa0a1259577b2b61e1995785b186c3193423ed
parentb9fae93ff8392cd97a3659ae4449300a6bdc0ca6
selftests/bpf: Enable cross-building with clang

Cross building using clang requires passing the "-target" flag rather
than using the CROSS_COMPILE prefix. Makefile.include transforms
CROSS_COMPILE into CLANG_CROSS_FLAGS. Clear CROSS_COMPILE for bpftool
and the host libbpf, and use the clang flags for urandom_read and bench.

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-7-jean-philippe@linaro.org
tools/testing/selftests/bpf/Makefile