diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 73 |
1 files changed, 28 insertions, 45 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 28 | 3 | SUBLEVEL = 29 |
4 | EXTRAVERSION = | 4 | EXTRAVERSION = -rc3 |
5 | NAME = Erotic Pickled Herring | 5 | NAME = 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 |
214 | hdr-arch := $(SRCARCH) | 214 | hdr-arch := $(SRCARCH) |
215 | 215 | ||
216 | ifeq ($(ARCH),m68knommu) | ||
217 | hdr-arch := m68k | ||
218 | endif | ||
219 | |||
216 | KCONFIG_CONFIG ?= .config | 220 | KCONFIG_CONFIG ?= .config |
217 | 221 | ||
218 | # SHELL used by kbuild | 222 | # SHELL used by kbuild |
@@ -321,7 +325,8 @@ KALLSYMS = scripts/kallsyms | |||
321 | PERL = perl | 325 | PERL = perl |
322 | CHECK = sparse | 326 | CHECK = sparse |
323 | 327 | ||
324 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise $(CF) | 328 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
329 | -Wbitwise -Wno-return-void $(CF) | ||
325 | MODFLAGS = -DMODULE | 330 | MODFLAGS = -DMODULE |
326 | CFLAGS_MODULE = $(MODFLAGS) | 331 | CFLAGS_MODULE = $(MODFLAGS) |
327 | AFLAGS_MODULE = $(MODFLAGS) | 332 | AFLAGS_MODULE = $(MODFLAGS) |
@@ -605,25 +610,20 @@ export INSTALL_PATH ?= /boot | |||
605 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | 610 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
606 | export MODLIB | 611 | export MODLIB |
607 | 612 | ||
608 | strip-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 | |||
616 | ifdef INSTALL_MOD_STRIP | 619 | ifdef INSTALL_MOD_STRIP |
617 | ifeq ($(INSTALL_MOD_STRIP),1) | 620 | ifeq ($(INSTALL_MOD_STRIP),1) |
618 | mod_strip_cmd = $(OBJCOPY) --strip-debug | 621 | mod_strip_cmd = $(STRIP) --strip-debug |
619 | ifeq ($(CONFIG_KALLSYMS_ALL),$(CONFIG_KALLSYMS_STRIP_GENERATED)) | ||
620 | mod_strip_cmd += --wildcard $(addprefix --strip-symbols ,$(strip-symbols)) | ||
621 | endif | ||
622 | else | 622 | else |
623 | mod_strip_cmd = $(OBJCOPY) $(INSTALL_MOD_STRIP) | 623 | mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP) |
624 | endif # INSTALL_MOD_STRIP=1 | 624 | endif # INSTALL_MOD_STRIP=1 |
625 | else | 625 | else |
626 | mod_strip_cmd = false | 626 | mod_strip_cmd = true |
627 | endif # INSTALL_MOD_STRIP | 627 | endif # INSTALL_MOD_STRIP |
628 | export mod_strip_cmd | 628 | export mod_strip_cmd |
629 | 629 | ||
@@ -753,7 +753,6 @@ last_kallsyms := 2 | |||
753 | endif | 753 | endif |
754 | 754 | ||
755 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o | 755 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o |
756 | kallsyms.h := $(wildcard include/config/kallsyms/*.h) $(wildcard include/config/kallsyms/*/*.h) | ||
757 | 756 | ||
758 | define verify_kallsyms | 757 | define 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 |
780 | quiet_cmd_kallsyms = KSYM $@ | 779 | quiet_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 | ||
784 | quiet_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 | ||
791 | ifeq ($(CONFIG_KALLSYMS_STRIP_GENERATED),y) | 786 | .tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) |
792 | strip-ext := .stripped | ||
793 | endif | ||
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 | |||
803 | ifneq ($(CONFIG_DEBUG_INFO),y) | ||
804 | .tmp_vmlinux%: LDFLAGS_vmlinux += -S | ||
805 | endif | ||
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 | ||
967 | endif | 950 | endif |
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 | |||
1007 | endef | 990 | endef |
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. |
1012 | define create-symlink | 995 | define create-symlink |
1013 | if [ ! -L include/asm ]; then \ | 996 | if [ ! -L include/asm ]; then \ |