selftests/bpf: Pass target triple to get_sys_includes macro
authorBjörn Töpel <bjorn@rivosinc.com>
Tue, 15 Nov 2022 18:20:51 +0000 (19:20 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 17 Nov 2022 23:14:35 +0000 (15:14 -0800)
commit98b2afc8a67f651ed01fc7d5a7e2528e63dd4e08
tree01d6f877951259ce169647523a0d3b1f860d2116
parentc4525f05ca3ca2795fc626252fb1c1cbb310111b
selftests/bpf: Pass target triple to get_sys_includes macro

When cross-compiling [1], the get_sys_includes make macro should use
the target system include path, and not the build hosts system include
path.

Make clang honor the CROSS_COMPILE triple.

[1] e.g. "ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- make"

Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Link: https://lore.kernel.org/bpf/20221115182051.582962-2-bjorn@kernel.org
tools/testing/selftests/bpf/Makefile