aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 13:12:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-14 13:12:46 -0400
commit3b7b3e6ec5f56118046594d3c62469e7d1d0aadd (patch)
tree3a6eb410ee27b660b7c085c81619f9e69fb5f0fa /Makefile
parente3b1fd56f175526db42ae94c457f29c2fa810aca (diff)
parent164f0d2efaaef835473e74b162eae750341d6a8c (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--Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a897c50db515..ada00f0d2a11 100644
--- a/Makefile
+++ b/Makefile
@@ -372,6 +372,7 @@ GENKSYMS = scripts/genksyms/genksyms
372INSTALLKERNEL := installkernel 372INSTALLKERNEL := installkernel
373DEPMOD = /sbin/depmod 373DEPMOD = /sbin/depmod
374PERL = perl 374PERL = perl
375PYTHON = python
375CHECK = sparse 376CHECK = sparse
376 377
377CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ 378CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
@@ -422,7 +423,7 @@ KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(S
422export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION 423export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
423export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC 424export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
424export CPP AR NM STRIP OBJCOPY OBJDUMP 425export CPP AR NM STRIP OBJCOPY OBJDUMP
425export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE 426export MAKE AWK GENKSYMS INSTALLKERNEL PERL PYTHON UTS_MACHINE
426export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS 427export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
427 428
428export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS 429export 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
689KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) 690KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,)
691KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior)
690else 692else
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
710KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) 712KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
711 713
712ifdef CONFIG_DEBUG_INFO 714ifdef CONFIG_DEBUG_INFO
715ifdef CONFIG_DEBUG_INFO_SPLIT
716KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
717else
713KBUILD_CFLAGS += -g 718KBUILD_CFLAGS += -g
719endif
714KBUILD_AFLAGS += -Wa,-gdwarf-2 720KBUILD_AFLAGS += -Wa,-gdwarf-2
715endif 721endif
722ifdef CONFIG_DEBUG_INFO_DWARF4
723KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,)
724endif
716 725
717ifdef CONFIG_DEBUG_INFO_REDUCED 726ifdef CONFIG_DEBUG_INFO_REDUCED
718KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ 727KBUILD_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.*' \