summaryrefslogtreecommitdiffstats
path: root/scripts/Kbuild.include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 23:12:19 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-09-08 23:12:19 +0200
commitdab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528 (patch)
tree6bbe14d6ec101bc278a8166469fdaa07d8f6493c /scripts/Kbuild.include
parentMerge tag 'trace-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/roste... (diff)
parentkbuild: Fix clang detection (diff)
downloadlinux-dab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528.tar.xz
linux-dab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528.zip
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull core kbuild updates from Michal Marek: - modpost portability fix - linker script fix - genksyms segfault fix - fixdep cleanup - fix for clang detection * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Fix clang detection kbuild: fixdep: drop meaningless hash table initialization kbuild: fixdep: optimize code slightly genksyms: Regenerate parser genksyms: Duplicate function pointer type definitions segfault kbuild: Fix .text.unlikely placement Avoid conflict with host definitions when cross-compiling
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r--scripts/Kbuild.include4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 608ac65c61e3..1db6d73c8dd2 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -128,6 +128,10 @@ cc-option-align = $(subst -functions=0,,\
cc-disable-warning = $(call try-run,\
$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))
+# cc-name
+# Expands to either gcc or clang
+cc-name = $(shell $(CC) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
+
# cc-version
cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC))