summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-10-30 14:26:34 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-11-02 14:49:01 +0100
commit995167420797c000bff1f0787ab2390ffa1a9784 (patch)
tree87f32e8f182cbbb354ff1fb91ec439fe0d578e03 /Makefile
parentkbuild: replace cc-name test with CONFIG_CC_IS_CLANG (diff)
downloadlinux-995167420797c000bff1f0787ab2390ffa1a9784.tar.xz
linux-995167420797c000bff1f0787ab2390ffa1a9784.zip
kbuild: remove cc-name variable
There is one more user of $(cc-name) in the top Makefile. It is supposed to detect Clang before invoking Kconfig, so it should still be there in the $(shell ...) form. All the other users of $(cc-name) have been replaced with $(CONFIG_CC_IS_CLANG). Hence, scripts/Kbuild.include does not need to define cc-name any more. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 8d6529c371e1..bce41f4180fc 100644
--- a/Makefile
+++ b/Makefile
@@ -485,7 +485,7 @@ ifneq ($(KBUILD_SRC),)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
endif
-ifeq ($(cc-name),clang)
+ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
ifneq ($(CROSS_COMPILE),)
CLANG_TARGET := --target=$(notdir $(CROSS_COMPILE:%-=%))
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD)))