diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 17:26:58 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-14 17:26:58 -0400 |
| commit | 84d69848c97faab0c25aa2667b273404d2e2a64a (patch) | |
| tree | 594f3fe1b271b5255a1c5281e36f8bf938acd1c0 /Makefile | |
| parent | d4d24d2d0a7ea3b62efd7336bfc2344e29b36bc5 (diff) | |
| parent | 590abbdd273304b55824bcb9ea91840ea375575d (diff) | |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild updates from Michal Marek:
- EXPORT_SYMBOL for asm source by Al Viro.
This does bring a regression, because genksyms no longer generates
checksums for these symbols (CONFIG_MODVERSIONS). Nick Piggin is
working on a patch to fix this.
Plus, we are talking about functions like strcpy(), which rarely
change prototypes.
- Fixes for PPC fallout of the above by Stephen Rothwell and Nick
Piggin
- fixdep speedup by Alexey Dobriyan.
- preparatory work by Nick Piggin to allow architectures to build with
-ffunction-sections, -fdata-sections and --gc-sections
- CONFIG_THIN_ARCHIVES support by Stephen Rothwell
- fix for filenames with colons in the initramfs source by me.
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (22 commits)
initramfs: Escape colons in depfile
ppc: there is no clear_pages to export
powerpc/64: whitelist unresolved modversions CRCs
kbuild: -ffunction-sections fix for archs with conflicting sections
kbuild: add arch specific post-link Makefile
kbuild: allow archs to select link dead code/data elimination
kbuild: allow architectures to use thin archives instead of ld -r
kbuild: Regenerate genksyms lexer
kbuild: genksyms fix for typeof handling
fixdep: faster CONFIG_ search
ia64: move exports to definitions
sparc32: debride memcpy.S a bit
[sparc] unify 32bit and 64bit string.h
sparc: move exports to definitions
ppc: move exports to definitions
arm: move exports to definitions
s390: move exports to definitions
m68k: move exports to definitions
alpha: move exports to actual definitions
x86: move exports to actual definitions
...
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 16 insertions, 3 deletions
| @@ -623,6 +623,11 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks,) | |||
| 623 | KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) | 623 | KBUILD_CFLAGS += $(call cc-disable-warning,maybe-uninitialized,) |
| 624 | KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) | 624 | KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,) |
| 625 | 625 | ||
| 626 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION | ||
| 627 | KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) | ||
| 628 | KBUILD_CFLAGS += $(call cc-option,-fdata-sections,) | ||
| 629 | endif | ||
| 630 | |||
| 626 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE | 631 | ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE |
| 627 | KBUILD_CFLAGS += -Os | 632 | KBUILD_CFLAGS += -Os |
| 628 | else | 633 | else |
| @@ -803,6 +808,10 @@ LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\ | |||
| 803 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) | 808 | KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID) |
| 804 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) | 809 | LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID) |
| 805 | 810 | ||
| 811 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION | ||
| 812 | LDFLAGS_vmlinux += $(call ld-option, --gc-sections,) | ||
| 813 | endif | ||
| 814 | |||
| 806 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) | 815 | ifeq ($(CONFIG_STRIP_ASM_SYMS),y) |
| 807 | LDFLAGS_vmlinux += $(call ld-option, -X,) | 816 | LDFLAGS_vmlinux += $(call ld-option, -X,) |
| 808 | endif | 817 | endif |
| @@ -942,9 +951,12 @@ endif | |||
| 942 | include/generated/autoksyms.h: FORCE | 951 | include/generated/autoksyms.h: FORCE |
| 943 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh true | 952 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/adjust_autoksyms.sh true |
| 944 | 953 | ||
| 945 | # Final link of vmlinux | 954 | ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) |
| 946 | cmd_link-vmlinux = $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) | 955 | |
| 947 | quiet_cmd_link-vmlinux = LINK $@ | 956 | # Final link of vmlinux with optional arch pass after final link |
| 957 | cmd_link-vmlinux = \ | ||
| 958 | $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ | ||
| 959 | $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) | ||
| 948 | 960 | ||
| 949 | vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE | 961 | vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE |
| 950 | +$(call if_changed,link-vmlinux) | 962 | +$(call if_changed,link-vmlinux) |
| @@ -1271,6 +1283,7 @@ $(clean-dirs): | |||
| 1271 | 1283 | ||
| 1272 | vmlinuxclean: | 1284 | vmlinuxclean: |
| 1273 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean | 1285 | $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean |
| 1286 | $(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean) | ||
| 1274 | 1287 | ||
| 1275 | clean: archclean vmlinuxclean | 1288 | clean: archclean vmlinuxclean |
| 1276 | 1289 | ||
