Commit 518c1340 authored by Ivan Khoronzhuk's avatar Ivan Khoronzhuk Committed by Alexei Starovoitov

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: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarAndrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20191011002808.28206-4-ivan.khoronzhuk@linaro.org
parent 39e0c364
...@@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole ...@@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole
# Detect that we're cross compiling and use the cross compiler # Detect that we're cross compiling and use the cross compiler
ifdef CROSS_COMPILE ifdef CROSS_COMPILE
HOSTCC = $(CROSS_COMPILE)gcc HOSTCC = $(CROSS_COMPILE)gcc
CLANG_ARCH_ARGS = -target $(ARCH) CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%))
endif endif
# Don't evaluate probes and warnings if we need to run make recursively # Don't evaluate probes and warnings if we need to run make recursively
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment