summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMasahiro Yamada2018-10-30 14:26:33 +0100
committerMasahiro Yamada2018-11-02 14:49:00 +0100
commit076f421da5d4594d0a3e60c032ccf02ba55e868a (patch)
treef9e534cbf76b4fd8e47ff8690caf132d439f9310 /Makefile
parentmerge_config.sh: Allow to define config prefix (diff)
downloadkernel-qcow2-linux-076f421da5d4594d0a3e60c032ccf02ba55e868a.tar.gz
kernel-qcow2-linux-076f421da5d4594d0a3e60c032ccf02ba55e868a.tar.xz
kernel-qcow2-linux-076f421da5d4594d0a3e60c032ccf02ba55e868a.zip
kbuild: replace cc-name test with CONFIG_CC_IS_CLANG
Evaluating cc-name invokes the compiler every time even when you are not compiling anything, like 'make help'. This is not efficient. The compiler type has been already detected in the Kconfig stage. Use CONFIG_CC_IS_CLANG, instead. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Acked-by: Paul Burton <paul.burton@mips.com> (MIPS) Acked-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 9aa352b38815..8d6529c371e1 100644
--- a/Makefile
+++ b/Makefile
@@ -702,7 +702,7 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong
KBUILD_CFLAGS += $(stackp-flags-y)
-ifeq ($(cc-name),clang)
+ifdef CONFIG_CC_IS_CLANG
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)