aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile73
1 files changed, 28 insertions, 45 deletions
diff --git a/Makefile b/Makefile
index d13a9694e159..7715b2c14fb4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 28 3SUBLEVEL = 29
4EXTRAVERSION = 4EXTRAVERSION = -rc3
5NAME = Erotic Pickled Herring 5NAME = Erotic Pickled Herring
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -213,6 +213,10 @@ endif
213# Where to locate arch specific headers 213# Where to locate arch specific headers
214hdr-arch := $(SRCARCH) 214hdr-arch := $(SRCARCH)
215 215
216ifeq ($(ARCH),m68knommu)
217 hdr-arch := m68k
218endif
219
216KCONFIG_CONFIG ?= .config 220KCONFIG_CONFIG ?= .config
217 221
218# SHELL used by kbuild 222# SHELL used by kbuild
@@ -321,7 +325,8 @@ KALLSYMS = scripts/kallsyms
321PERL = perl 325PERL = perl
322CHECK = sparse 326CHECK = sparse
323 327
324CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF) 328CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
329 -Wbitwise -Wno-return-void $(CF)
325MODFLAGS = -DMODULE 330MODFLAGS = -DMODULE
326CFLAGS_MODULE = $(MODFLAGS) 331CFLAGS_MODULE = $(MODFLAGS)
327AFLAGS_MODULE = $(MODFLAGS) 332AFLAGS_MODULE = $(MODFLAGS)
@@ -605,25 +610,20 @@ export INSTALL_PATH ?= /boot
605MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) 610MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
606export MODLIB 611export MODLIB
607 612
608strip-symbols := $(srctree)/scripts/strip-symbols \
609 $(wildcard $(srctree)/arch/$(ARCH)/scripts/strip-symbols)
610
611# 613#
612# INSTALL_MOD_STRIP, if defined, will cause modules to be stripped while 614# INSTALL_MOD_STRIP, if defined, will cause modules to be
613# they get installed. If INSTALL_MOD_STRIP is '1', then the default 615# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
614# options (see below) will be used. Otherwise, INSTALL_MOD_STRIP will 616# the default option --strip-debug will be used. Otherwise,
615# be used as the option(s) to the objcopy command. 617# INSTALL_MOD_STRIP will used as the options to the strip command.
618
616ifdef INSTALL_MOD_STRIP 619ifdef INSTALL_MOD_STRIP
617ifeq ($(INSTALL_MOD_STRIP),1) 620ifeq ($(INSTALL_MOD_STRIP),1)
618mod_strip_cmd = $(OBJCOPY) --strip-debug 621mod_strip_cmd = $(STRIP) --strip-debug
619ifeq ($(CONFIG_KALLSYMS_ALL),$(CONFIG_KALLSYMS_STRIP_GENERATED))
620mod_strip_cmd += --wildcard $(addprefix --strip-symbols ,$(strip-symbols))
621endif
622else 622else
623mod_strip_cmd = $(OBJCOPY) $(INSTALL_MOD_STRIP) 623mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
624endif # INSTALL_MOD_STRIP=1 624endif # INSTALL_MOD_STRIP=1
625else 625else
626mod_strip_cmd = false 626mod_strip_cmd = true
627endif # INSTALL_MOD_STRIP 627endif # INSTALL_MOD_STRIP
628export mod_strip_cmd 628export mod_strip_cmd
629 629
@@ -753,7 +753,6 @@ last_kallsyms := 2
753endif 753endif
754 754
755kallsyms.o := .tmp_kallsyms$(last_kallsyms).o 755kallsyms.o := .tmp_kallsyms$(last_kallsyms).o
756kallsyms.h := $(wildcard include/config/kallsyms/*.h) $(wildcard include/config/kallsyms/*/*.h)
757 756
758define verify_kallsyms 757define verify_kallsyms
759 $(Q)$(if $($(quiet)cmd_sysmap), \ 758 $(Q)$(if $($(quiet)cmd_sysmap), \
@@ -778,41 +777,24 @@ endef
778 777
779# Generate .S file with all kernel symbols 778# Generate .S file with all kernel symbols
780quiet_cmd_kallsyms = KSYM $@ 779quiet_cmd_kallsyms = KSYM $@
781 cmd_kallsyms = { test $* -eq 0 || $(NM) -n $<; } \ 780 cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \
782 | $(KALLSYMS) $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) >$@ 781 $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@
783 782
784quiet_cmd_kstrip = STRIP $@ 783.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE
785 cmd_kstrip = $(OBJCOPY) --wildcard $(addprefix --strip$(if $(CONFIG_RELOCATABLE),-unneeded)-symbols ,$(filter %/scripts/strip-symbols,$^)) $< $@
786
787$(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): KBUILD_AFLAGS += -Wa,--strip-local-absolute
788$(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): %.o: %.S scripts FORCE
789 $(call if_changed_dep,as_o_S) 784 $(call if_changed_dep,as_o_S)
790 785
791ifeq ($(CONFIG_KALLSYMS_STRIP_GENERATED),y) 786.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS)
792strip-ext := .stripped
793endif
794
795.tmp_kallsyms%.S: .tmp_vmlinux%$(strip-ext) $(KALLSYMS) $(kallsyms.h)
796 $(call cmd,kallsyms) 787 $(call cmd,kallsyms)
797 788
798# make -jN seems to have problems with intermediate files, see bug #3330.
799.SECONDARY: $(foreach n,1 2 3,.tmp_vmlinux$(n).stripped)
800.tmp_vmlinux%.stripped: .tmp_vmlinux% $(strip-symbols) $(kallsyms.h)
801 $(call cmd,kstrip)
802
803ifneq ($(CONFIG_DEBUG_INFO),y)
804.tmp_vmlinux%: LDFLAGS_vmlinux += -S
805endif
806# .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version 789# .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version
807.tmp_vmlinux%: $(vmlinux-lds) $(vmlinux-all) FORCE 790.tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE
808 $(if $(filter 1,$*),$(call if_changed_rule,ksym_ld),$(call if_changed,vmlinux__)) 791 $(call if_changed_rule,ksym_ld)
809 792
810.tmp_vmlinux0$(strip-ext): 793.tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE
811 $(Q)echo "placeholder" >$@ 794 $(call if_changed,vmlinux__)
812 795
813.tmp_vmlinux1: .tmp_kallsyms0.o 796.tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE
814.tmp_vmlinux2: .tmp_kallsyms1.o 797 $(call if_changed,vmlinux__)
815.tmp_vmlinux3: .tmp_kallsyms2.o
816 798
817# Needs to visit scripts/ before $(KALLSYMS) can be used. 799# Needs to visit scripts/ before $(KALLSYMS) can be used.
818$(KALLSYMS): scripts ; 800$(KALLSYMS): scripts ;
@@ -964,6 +946,7 @@ ifneq ($(KBUILD_SRC),)
964 mkdir -p include2; \ 946 mkdir -p include2; \
965 ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ 947 ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
966 fi 948 fi
949 ln -fsn $(srctree) source
967endif 950endif
968 951
969# prepare2 creates a makefile if using a separate output directory 952# prepare2 creates a makefile if using a separate output directory
@@ -1007,7 +990,7 @@ define check-symlink
1007endef 990endef
1008 991
1009# We create the target directory of the symlink if it does 992# We create the target directory of the symlink if it does
1010# not exist so the test in chack-symlink works and we have a 993# not exist so the test in check-symlink works and we have a
1011# directory for generated filesas used by some architectures. 994# directory for generated filesas used by some architectures.
1012define create-symlink 995define create-symlink
1013 if [ ! -L include/asm ]; then \ 996 if [ ! -L include/asm ]; then \