summaryrefslogtreecommitdiff
path: root/scripts/Makefile.extrawarn
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.com>2015-08-19 18:36:41 +0300
committerMichal Marek <mmarek@suse.com>2015-09-04 14:14:10 +0300
commit5631d9c429857194bd55d7bcd8fa5bdd1a9899a3 (patch)
treef0424c4fe42eb83bf35a0cda4204aff097a8b192 /scripts/Makefile.extrawarn
parentd179e22762fd38414c4108acedd5feca4cf7e0d8 (diff)
downloadlinux-5631d9c429857194bd55d7bcd8fa5bdd1a9899a3.tar.xz
kbuild: Fix clang detection
We cannot detect clang before including the arch Makefile, because that can set the default cross compiler. We also cannot detect clang after including the arch Makefile, because powerpc wants to know about clang. Solve this by using an deferred variable. This costs us a few shell invocations, but this is only a constant number. Reported-by: Behan Webster <behanw@converseincode.com> Reported-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michal Marek <mmarek@suse.com>
Diffstat (limited to 'scripts/Makefile.extrawarn')
-rw-r--r--scripts/Makefile.extrawarn2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn
index f734033af219..4efedcbe4165 100644
--- a/scripts/Makefile.extrawarn
+++ b/scripts/Makefile.extrawarn
@@ -56,7 +56,7 @@ endif
KBUILD_CFLAGS += $(warning)
else
-ifeq ($(COMPILER),clang)
+ifeq ($(cc-name),clang)
KBUILD_CFLAGS += $(call cc-disable-warning, initializer-overrides)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-value)
KBUILD_CFLAGS += $(call cc-disable-warning, format)