summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>2019-10-11 03:27:56 +0300
committerAlexei Starovoitov <ast@kernel.org>2019-10-13 02:08:59 +0300
commit518c13401e16eae1d83d6e459daf6e776a97eba9 (patch)
tree5a01fa615853745b409592cc584b9b490cf8ed2b /samples
parent39e0c3649f2ef5fc1beac4f6cc5f5f9ddb1885a9 (diff)
downloadlinux-518c13401e16eae1d83d6e459daf6e776a97eba9.tar.xz
samples/bpf: Use --target from cross-compile
For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20191011002808.28206-4-ivan.khoronzhuk@linaro.org
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 045fa43842e6..9c8c9872004d 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole
# Detect that we're cross compiling and use the cross compiler
ifdef CROSS_COMPILE
HOSTCC = $(CROSS_COMPILE)gcc
-CLANG_ARCH_ARGS = -target $(ARCH)
+CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%))
endif
# Don't evaluate probes and warnings if we need to run make recursively