aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Kbuild.include12
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index d93250b33bf6..c1e15a4aee36 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -71,14 +71,10 @@ endef
71 71
72# cc-cross-prefix 72# cc-cross-prefix
73# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) 73# Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-)
74# Return first prefix where a prefix$(CC) is found in PATH. 74# Return first <prefix> where a <prefix>gcc is found in PATH.
75# If no $(CC) found in PATH with listed prefixes return nothing 75# If no gcc found in PATH with listed prefixes return nothing
76cc-cross-prefix = \ 76cc-cross-prefix = $(firstword $(foreach c, $(filter-out -%, $(1)), \
77 $(word 1, $(foreach c,$(1), \ 77 $(if $(shell which $(c)gcc), $(c))))
78 $(shell set -e; \
79 if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \
80 echo $(c); \
81 fi)))
82 78
83# output directory for tests below 79# output directory for tests below
84TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) 80TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)