diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-02 17:58:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-07-02 17:58:12 -0400 |
commit | e965b8ce4215ac2b22b23ffc8a8dfbae964b9496 (patch) | |
tree | 9f7d23f14655c214d4e1f54760a841df2c987459 /Makefile | |
parent | a95cb3cd55c208372ca68d5e8a9923611fed7235 (diff) | |
parent | 50ab9a69275dca588cb5ad5038657f069bbdeb56 (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
"Just a few kbuild core commits this time:
- kallsyms fix for CONFIG_XIP_KERNEL
- bashisms in scripts/link-vmlinux.sh fixed
- workaround to make DEBUG_INFO_REDUCED more useful yet still space
efficient
- clang is not wrongly detected when cross-compiling"
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: include core debug info when DEBUG_INFO_REDUCED
scripts: link-vmlinux: Don't pass page offset to kallsyms if XIP Kernel
scripts: fix link-vmlinux.sh bash-ism
Makefile: Fix detection of clang when cross-compiling
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -335,15 +335,6 @@ endif | |||
335 | export KBUILD_MODULES KBUILD_BUILTIN | 335 | export KBUILD_MODULES KBUILD_BUILTIN |
336 | export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD | 336 | export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD |
337 | 337 | ||
338 | ifneq ($(CC),) | ||
339 | ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) | ||
340 | COMPILER := clang | ||
341 | else | ||
342 | COMPILER := gcc | ||
343 | endif | ||
344 | export COMPILER | ||
345 | endif | ||
346 | |||
347 | # We need some generic definitions (do not try to remake the file). | 338 | # We need some generic definitions (do not try to remake the file). |
348 | scripts/Kbuild.include: ; | 339 | scripts/Kbuild.include: ; |
349 | include scripts/Kbuild.include | 340 | include scripts/Kbuild.include |
@@ -670,6 +661,13 @@ endif | |||
670 | endif | 661 | endif |
671 | KBUILD_CFLAGS += $(stackp-flag) | 662 | KBUILD_CFLAGS += $(stackp-flag) |
672 | 663 | ||
664 | ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1) | ||
665 | COMPILER := clang | ||
666 | else | ||
667 | COMPILER := gcc | ||
668 | endif | ||
669 | export COMPILER | ||
670 | |||
673 | ifeq ($(COMPILER),clang) | 671 | ifeq ($(COMPILER),clang) |
674 | KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) | 672 | KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) |
675 | KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,) | 673 | KBUILD_CPPFLAGS += $(call cc-option,-Wno-unknown-warning-option,) |