diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-06 14:00:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-06-06 14:00:15 -0400 |
commit | 8715ee75fe6fa3aed367f28aa7a3655e6a8e4688 (patch) | |
tree | 192c25a109a73ca67d4483d89ee576660bb5f29c /Makefile | |
parent | 126f7051b4daa3716d9af2851dcb55316e4c2b25 (diff) | |
parent | 1f2f01b122d7c78a9e842a126ef168afb279552b (diff) |
Merge tag 'kbuild-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- improve fixdep to coalesce consecutive slashes in dep-files
- fix some issues of the maintainer string generation in deb-pkg script
- remove unused CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX and clean-up
several tools and linker scripts
- clean-up modpost
- allow to enable the dead code/data elimination for PowerPC in EXPERT
mode
- improve two coccinelle scripts for better performance
- pass endianness and machine size flags to sparse for all architecture
- misc fixes
* tag 'kbuild-v4.18' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
kbuild: add machine size to CHECKFLAGS
kbuild: add endianness flag to CHEKCFLAGS
kbuild: $(CHECK) doesnt need NOSTDINC_FLAGS twice
scripts: Fixed printf format mismatch
scripts/tags.sh: use `find` for $ALLSOURCE_ARCHS generation
coccinelle: deref_null: improve performance
coccinelle: mini_lock: improve performance
powerpc: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selected
kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled
kbuild: LD_DEAD_CODE_DATA_ELIMINATION no -ffunction-sections/-fdata-sections for module build
kbuild: Fix asm-generic/vmlinux.lds.h for LD_DEAD_CODE_DATA_ELIMINATION
modpost: constify *modname function argument where possible
modpost: remove redundant is_vmlinux() test
modpost: use strstarts() helper more widely
modpost: pass struct elf_info pointer to get_modinfo()
checkpatch: remove VMLINUX_SYMBOL() check
vmlinux.lds.h: remove no-op macro VMLINUX_SYMBOL()
kbuild: remove CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX
export.h: remove code for prefixing symbols with underscore
depmod.sh: remove symbol prefix support
...
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -802,13 +802,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once) | |||
802 | endif | 802 | endif |
803 | 803 | ||
804 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION | 804 | ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION |
805 | KBUILD_CFLAGS += $(call cc-option,-ffunction-sections,) | 805 | KBUILD_CFLAGS_KERNEL += $(call cc-option,-ffunction-sections,) |
806 | KBUILD_CFLAGS += $(call cc-option,-fdata-sections,) | 806 | KBUILD_CFLAGS_KERNEL += $(call cc-option,-fdata-sections,) |
807 | endif | 807 | endif |
808 | 808 | ||
809 | # arch Makefile may override CC so keep this after arch Makefile is included | 809 | # arch Makefile may override CC so keep this after arch Makefile is included |
810 | NOSTDINC_FLAGS += -nostdinc -isystem $(call shell-cached,$(CC) -print-file-name=include) | 810 | NOSTDINC_FLAGS += -nostdinc -isystem $(call shell-cached,$(CC) -print-file-name=include) |
811 | CHECKFLAGS += $(NOSTDINC_FLAGS) | ||
812 | 811 | ||
813 | # warn about C99 declaration after statement | 812 | # warn about C99 declaration after statement |
814 | KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) | 813 | KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) |
@@ -878,6 +877,12 @@ ifeq ($(CONFIG_STRIP_ASM_SYMS),y) | |||
878 | LDFLAGS_vmlinux += $(call ld-option, -X,) | 877 | LDFLAGS_vmlinux += $(call ld-option, -X,) |
879 | endif | 878 | endif |
880 | 879 | ||
880 | # insure the checker run with the right endianness | ||
881 | CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian) | ||
882 | |||
883 | # the checker needs the correct machine size | ||
884 | CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32) | ||
885 | |||
881 | # Default kernel image to build when no specific target is given. | 886 | # Default kernel image to build when no specific target is given. |
882 | # KBUILD_IMAGE may be overruled on the command line or | 887 | # KBUILD_IMAGE may be overruled on the command line or |
883 | # set in the environment | 888 | # set in the environment |
@@ -1763,7 +1768,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)) | |||
1763 | # Run depmod only if we have System.map and depmod is executable | 1768 | # Run depmod only if we have System.map and depmod is executable |
1764 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | 1769 | quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) |
1765 | cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \ | 1770 | cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \ |
1766 | $(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))" | 1771 | $(KERNELRELEASE) |
1767 | 1772 | ||
1768 | # Create temporary dir for module support files | 1773 | # Create temporary dir for module support files |
1769 | # clean it up only when building all modules | 1774 | # clean it up only when building all modules |