diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 15:51:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-03 15:51:22 -0700 |
commit | 3b24b83763e72a6c1e728100104fd99aa83a7b3b (patch) | |
tree | bd493c47804a9fe1e85ee41c2532b4748fca0b25 /arch | |
parent | 0734e00ef9e48e78c5c3ce1648572f160d07e323 (diff) | |
parent | a95b37e20db9a2b05354eec009b2188523a21c8e (diff) |
Merge tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild updates from Masahiro Yamada:
- add a shell script to get Clang version
- improve portability of build scripts
- drop always-enabled CONFIG_THIN_ARCHIVE and remove unused code
- rename built-in.o which is now thin archive to built-in.a
- process clean/build targets one by one to get along with -j option
- simplify ld-option
- improve building with CONFIG_TRIM_UNUSED_KSYMS
- define KBUILD_MODNAME even for objects shared among multiple modules
- avoid linking multiple instances of same objects from composite
objects
- move <linux/compiler_types.h> to c_flags to include it only for C
files
- clean-up various Makefiles
* tag 'kbuild-v4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (29 commits)
kbuild: get <linux/compiler_types.h> out of <linux/kconfig.h>
kbuild: clean up link rule of composite modules
kbuild: clean up archive rule of built-in.a
kbuild: remove partial section mismatch detection for built-in.a
net: liquidio: clean up Makefile for simpler composite object handling
lib: zstd: clean up Makefile for simpler composite object handling
kbuild: link $(real-obj-y) instead of $(obj-y) into built-in.a
kbuild: rename real-objs-y/m to real-obj-y/m
kbuild: move modname and modname-multi close to modname_flags
kbuild: simplify modname calculation
kbuild: fix modname for composite modules
kbuild: define KBUILD_MODNAME even if multiple modules share objects
kbuild: remove unnecessary $(subst $(obj)/, , ...) in modname-multi
kbuild: Use ls(1) instead of stat(1) to obtain file size
kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS
kbuild: move include/config/ksym/* to include/ksym/*
kbuild: move CONFIG_TRIM_UNUSED_KSYMS code unneeded for external module
kbuild: restore autoksyms.h touch to the top Makefile
kbuild: move 'scripts' target below
kbuild: remove wrong 'touch' in adjust_autoksyms.sh
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/Kconfig | 6 | ||||
-rwxr-xr-x | arch/arm/boot/deflate_xip_data.sh | 2 | ||||
-rwxr-xr-x | arch/powerpc/boot/wrapper | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/Makefile | 2 |
4 files changed, 3 insertions, 9 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 76c0b54443b1..8e0d665c8d53 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -596,12 +596,6 @@ config CC_STACKPROTECTOR_AUTO endchoice -config THIN_ARCHIVES - def_bool y - help - Select this if the architecture wants to use thin archives - instead of ld -r to create the built-in.o files. - config LD_DEAD_CODE_DATA_ELIMINATION bool help diff --git a/arch/arm/boot/deflate_xip_data.sh b/arch/arm/boot/deflate_xip_data.sh index 5e7d758ebdd6..b7fa67d2d9e3 100755 --- a/arch/arm/boot/deflate_xip_data.sh +++ b/arch/arm/boot/deflate_xip_data.sh @@ -45,7 +45,7 @@ data_start=$(($__data_loc - $base_offset)) data_end=$(($_edata_loc - $base_offset)) # Make sure data occupies the last part of the file. -file_end=$(stat -c "%s" "$XIPIMAGE") +file_end=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "$XIPIMAGE") if [ "$file_end" != "$data_end" ]; then printf "end of xipImage doesn't match with _edata_loc (%#x vs %#x)\n" \ $(($file_end + $base_offset)) $_edata_loc 1>&2 diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 76fe3ccfd381..f9141eaec6ff 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper @@ -355,7 +355,7 @@ vmz="$tmpdir/`basename \"$kernel\"`.$ext" # Calculate the vmlinux.strip size ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" -strip_size=$(stat -c %s $vmz.$$) +strip_size=$(${CONFIG_SHELL} "${srctree}/scripts/file-size.sh" "$vmz.$$") if [ -z "$cacheit" -o ! -f "$vmz$compression" -o "$vmz$compression" -ot "$kernel" ]; then # recompress the image if we need to diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile index 1b6bc7fba996..2358f97d62ec 100644 --- a/arch/powerpc/kernel/Makefile +++ b/arch/powerpc/kernel/Makefile @@ -165,7 +165,7 @@ systbl_chk: $(src)/systbl_chk.sh $(obj)/systbl_chk.i $(call cmd,systbl_chk) ifeq ($(CONFIG_PPC_OF_BOOT_TRAMPOLINE),y) -$(obj)/built-in.o: prom_init_check +$(obj)/built-in.a: prom_init_check quiet_cmd_prom_init_check = CALL $< cmd_prom_init_check = $(CONFIG_SHELL) $< "$(NM)" "$(obj)/prom_init.o" |