diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 13:12:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-08-14 13:12:46 -0400 |
commit | 3b7b3e6ec5f56118046594d3c62469e7d1d0aadd (patch) | |
tree | 3a6eb410ee27b660b7c085c81619f9e69fb5f0fa /Makefile | |
parent | e3b1fd56f175526db42ae94c457f29c2fa810aca (diff) | |
parent | 164f0d2efaaef835473e74b162eae750341d6a8c (diff) |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
- make clean also considers $(extra-m) and $(extra-) to be consistent
- cleanup and fixes in scripts/Makefile.host
- allow to override the name of the Python 2 executable with make
PYTHON=... (only needed for ia64 in practice)
- option to split debugingo into *.dwo files to save disk space if the
compiler supports it (CONFIG_DEBUG_INFO_SPLIT)
- option to use dwarf4 debuginfo if the compiler supports it
(CONFIG_DEBUG_INFO_DWARF4)
- fix for disabling certain warnings with clang
- fix for unneeded rebuild with dash when a command contains
backslashes
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Fix handling of backslashes in *.cmd files
kbuild, LLVMLinux: Supress warnings unless W=1-3
Kbuild: Add a option to enable dwarf4 v2
kbuild: Support split debug info v4
kbuild: allow to override Python command name
kbuild: clean-up and bug fix of scripts/Makefile.host
kbuild: clean up scripts/Makefile.host
kbuild: drop shared library support from Makefile.host
kbuild: fix a bug of C++ host program handling
kbuild: fix a typo in scripts/Makefile.host
scripts/Makefile.clean: clean also $(extra-m) and $(extra-)
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -372,6 +372,7 @@ GENKSYMS = scripts/genksyms/genksyms | |||
372 | INSTALLKERNEL := installkernel | 372 | INSTALLKERNEL := installkernel |
373 | DEPMOD = /sbin/depmod | 373 | DEPMOD = /sbin/depmod |
374 | PERL = perl | 374 | PERL = perl |
375 | PYTHON = python | ||
375 | CHECK = sparse | 376 | CHECK = sparse |
376 | 377 | ||
377 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 378 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
@@ -422,7 +423,7 @@ KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(S | |||
422 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 423 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
423 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 424 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
424 | export CPP AR NM STRIP OBJCOPY OBJDUMP | 425 | export CPP AR NM STRIP OBJCOPY OBJDUMP |
425 | export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE | 426 | export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE |
426 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 427 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
427 | 428 | ||
428 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 429 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
@@ -687,6 +688,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) | |||
687 | # source of a reference will be _MergedGlobals and not on of the whitelisted names. | 688 | # source of a reference will be _MergedGlobals and not on of the whitelisted names. |
688 | # See modpost pattern 2 | 689 | # See modpost pattern 2 |
689 | KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) | 690 | KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) |
691 | KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) | ||
690 | else | 692 | else |
691 | 693 | ||
692 | # This warning generated too much noise in a regular build. | 694 | # This warning generated too much noise in a regular build. |
@@ -710,9 +712,16 @@ endif | |||
710 | KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) | 712 | KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) |
711 | 713 | ||
712 | ifdef CONFIG_DEBUG_INFO | 714 | ifdef CONFIG_DEBUG_INFO |
715 | ifdef CONFIG_DEBUG_INFO_SPLIT | ||
716 | KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g) | ||
717 | else | ||
713 | KBUILD_CFLAGS += -g | 718 | KBUILD_CFLAGS += -g |
719 | endif | ||
714 | KBUILD_AFLAGS += -Wa,-gdwarf-2 | 720 | KBUILD_AFLAGS += -Wa,-gdwarf-2 |
715 | endif | 721 | endif |
722 | ifdef CONFIG_DEBUG_INFO_DWARF4 | ||
723 | KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,) | ||
724 | endif | ||
716 | 725 | ||
717 | ifdef CONFIG_DEBUG_INFO_REDUCED | 726 | ifdef CONFIG_DEBUG_INFO_REDUCED |
718 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ | 727 | KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ |
@@ -1398,6 +1407,7 @@ clean: $(clean-dirs) | |||
1398 | @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ | 1407 | @find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \ |
1399 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ | 1408 | \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ |
1400 | -o -name '*.ko.*' \ | 1409 | -o -name '*.ko.*' \ |
1410 | -o -name '*.dwo' \ | ||
1401 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ | 1411 | -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \ |
1402 | -o -name '*.symtypes' -o -name 'modules.order' \ | 1412 | -o -name '*.symtypes' -o -name 'modules.order' \ |
1403 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ | 1413 | -o -name modules.builtin -o -name '.tmp_*.o.*' \ |