[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190910103830.20794-10-ivan.khoronzhuk@linaro.org>
Date: Tue, 10 Sep 2019 13:38:28 +0300
From: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
To: ast@...nel.org, daniel@...earbox.net, yhs@...com,
davem@...emloft.net, jakub.kicinski@...ronome.com, hawk@...nel.org,
john.fastabend@...il.com
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
bpf@...r.kernel.org, clang-built-linux@...glegroups.com,
Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
Subject: [PATCH bpf-next 09/11] samples: bpf: makefile: use CC environment for HDR_PROBE
No need in hacking HOSTCC to be cross-compiler any more, so drop
this trick and use CC for HDR_PROBE
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
---
samples/bpf/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 625a71f2e9d2..79c9aa41832e 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -209,15 +209,14 @@ 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=$(notdir $(CROSS_COMPILE:%-=%))
endif
# Don't evaluate probes and warnings if we need to run make recursively
ifneq ($(src),)
HDR_PROBE := $(shell printf "\#include <linux/types.h>\n struct list_head { int a; }; int main() { return 0; }" | \
- $(HOSTCC) $(KBUILD_HOSTCFLAGS) -x c - -o /dev/null 2>/dev/null && \
- echo okay)
+ $(CC) $(PROGS_CFLAGS) $(PROGS_LDFLAGS) -x c - -o /dev/null 2>/dev/null \
+ && echo okay)
ifeq ($(HDR_PROBE),)
$(warning WARNING: Detected possible issues with include path.)
--
2.17.1
Powered by blists - more mailing lists