diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 68 |
1 files changed, 25 insertions, 43 deletions
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 2 | 1 | VERSION = 2 |
2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
3 | SUBLEVEL = 29 | 3 | SUBLEVEL = 29 |
4 | EXTRAVERSION = -rc1 | 4 | EXTRAVERSION = -rc5 |
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 |
@@ -528,8 +532,9 @@ KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN}) | |||
528 | endif | 532 | endif |
529 | 533 | ||
530 | # Force gcc to behave correct even for buggy distributions | 534 | # Force gcc to behave correct even for buggy distributions |
531 | # Arch Makefiles may override this setting | 535 | ifndef CONFIG_CC_STACKPROTECTOR |
532 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) | 536 | KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector) |
537 | endif | ||
533 | 538 | ||
534 | ifdef CONFIG_FRAME_POINTER | 539 | ifdef CONFIG_FRAME_POINTER |
535 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls | 540 | KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls |
@@ -606,25 +611,20 @@ export INSTALL_PATH ?= /boot | |||
606 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) | 611 | MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) |
607 | export MODLIB | 612 | export MODLIB |
608 | 613 | ||
609 | strip-symbols := $(srctree)/scripts/strip-symbols \ | ||
610 | $(wildcard $(srctree)/arch/$(ARCH)/scripts/strip-symbols) | ||
611 | |||
612 | # | 614 | # |
613 | # INSTALL_MOD_STRIP, if defined, will cause modules to be stripped while | 615 | # INSTALL_MOD_STRIP, if defined, will cause modules to be |
614 | # they get installed. If INSTALL_MOD_STRIP is '1', then the default | 616 | # stripped after they are installed. If INSTALL_MOD_STRIP is '1', then |
615 | # options (see below) will be used. Otherwise, INSTALL_MOD_STRIP will | 617 | # the default option --strip-debug will be used. Otherwise, |
616 | # be used as the option(s) to the objcopy command. | 618 | # INSTALL_MOD_STRIP will used as the options to the strip command. |
619 | |||
617 | ifdef INSTALL_MOD_STRIP | 620 | ifdef INSTALL_MOD_STRIP |
618 | ifeq ($(INSTALL_MOD_STRIP),1) | 621 | ifeq ($(INSTALL_MOD_STRIP),1) |
619 | mod_strip_cmd = $(OBJCOPY) --strip-debug | 622 | mod_strip_cmd = $(STRIP) --strip-debug |
620 | ifeq ($(CONFIG_KALLSYMS_ALL),$(CONFIG_KALLSYMS_STRIP_GENERATED)) | ||
621 | mod_strip_cmd += --wildcard $(addprefix --strip-symbols ,$(strip-symbols)) | ||
622 | endif | ||
623 | else | 623 | else |
624 | mod_strip_cmd = $(OBJCOPY) $(INSTALL_MOD_STRIP) | 624 | mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP) |
625 | endif # INSTALL_MOD_STRIP=1 | 625 | endif # INSTALL_MOD_STRIP=1 |
626 | else | 626 | else |
627 | mod_strip_cmd = false | 627 | mod_strip_cmd = true |
628 | endif # INSTALL_MOD_STRIP | 628 | endif # INSTALL_MOD_STRIP |
629 | export mod_strip_cmd | 629 | export mod_strip_cmd |
630 | 630 | ||
@@ -754,7 +754,6 @@ last_kallsyms := 2 | |||
754 | endif | 754 | endif |
755 | 755 | ||
756 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o | 756 | kallsyms.o := .tmp_kallsyms$(last_kallsyms).o |
757 | kallsyms.h := $(wildcard include/config/kallsyms/*.h) $(wildcard include/config/kallsyms/*/*.h) | ||
758 | 757 | ||
759 | define verify_kallsyms | 758 | define verify_kallsyms |
760 | $(Q)$(if $($(quiet)cmd_sysmap), \ | 759 | $(Q)$(if $($(quiet)cmd_sysmap), \ |
@@ -779,41 +778,24 @@ endef | |||
779 | 778 | ||
780 | # Generate .S file with all kernel symbols | 779 | # Generate .S file with all kernel symbols |
781 | quiet_cmd_kallsyms = KSYM $@ | 780 | quiet_cmd_kallsyms = KSYM $@ |
782 | cmd_kallsyms = { test $* -eq 0 || $(NM) -n $<; } \ | 781 | cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \ |
783 | | $(KALLSYMS) $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) >$@ | 782 | $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ |
784 | 783 | ||
785 | quiet_cmd_kstrip = STRIP $@ | 784 | .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE |
786 | cmd_kstrip = $(OBJCOPY) --wildcard $(addprefix --strip$(if $(CONFIG_RELOCATABLE),-unneeded)-symbols ,$(filter %/scripts/strip-symbols,$^)) $< $@ | ||
787 | |||
788 | $(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): KBUILD_AFLAGS += -Wa,--strip-local-absolute | ||
789 | $(foreach n,0 1 2 3,.tmp_kallsyms$(n).o): %.o: %.S scripts FORCE | ||
790 | $(call if_changed_dep,as_o_S) | 785 | $(call if_changed_dep,as_o_S) |
791 | 786 | ||
792 | ifeq ($(CONFIG_KALLSYMS_STRIP_GENERATED),y) | 787 | .tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) |
793 | strip-ext := .stripped | ||
794 | endif | ||
795 | |||
796 | .tmp_kallsyms%.S: .tmp_vmlinux%$(strip-ext) $(KALLSYMS) $(kallsyms.h) | ||
797 | $(call cmd,kallsyms) | 788 | $(call cmd,kallsyms) |
798 | 789 | ||
799 | # make -jN seems to have problems with intermediate files, see bug #3330. | ||
800 | .SECONDARY: $(foreach n,1 2 3,.tmp_vmlinux$(n).stripped) | ||
801 | .tmp_vmlinux%.stripped: .tmp_vmlinux% $(strip-symbols) $(kallsyms.h) | ||
802 | $(call cmd,kstrip) | ||
803 | |||
804 | ifneq ($(CONFIG_DEBUG_INFO),y) | ||
805 | .tmp_vmlinux%: LDFLAGS_vmlinux += -S | ||
806 | endif | ||
807 | # .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version | 790 | # .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version |
808 | .tmp_vmlinux%: $(vmlinux-lds) $(vmlinux-all) FORCE | 791 | .tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE |
809 | $(if $(filter 1,$*),$(call if_changed_rule,ksym_ld),$(call if_changed,vmlinux__)) | 792 | $(call if_changed_rule,ksym_ld) |
810 | 793 | ||
811 | .tmp_vmlinux0$(strip-ext): | 794 | .tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE |
812 | $(Q)echo "placeholder" >$@ | 795 | $(call if_changed,vmlinux__) |
813 | 796 | ||
814 | .tmp_vmlinux1: .tmp_kallsyms0.o | 797 | .tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE |
815 | .tmp_vmlinux2: .tmp_kallsyms1.o | 798 | $(call if_changed,vmlinux__) |
816 | .tmp_vmlinux3: .tmp_kallsyms2.o | ||
817 | 799 | ||
818 | # Needs to visit scripts/ before $(KALLSYMS) can be used. | 800 | # Needs to visit scripts/ before $(KALLSYMS) can be used. |
819 | $(KALLSYMS): scripts ; | 801 | $(KALLSYMS): scripts ; |