diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-17 13:20:09 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-01-17 13:20:09 -0500 |
| commit | e4484a495586dddf989380f89a7c16d43db6790b (patch) | |
| tree | de735d4a299120bc10e4d87633a0d7136f979311 | |
| parent | d471c4dfa19f4d6de063256370a5be411a1f3149 (diff) | |
| parent | e00d8880481497474792d28c14479a9fb6752046 (diff) | |
Merge tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada:
- clean generated files in scripts/kconfig/ by 'make mrproper'
- fix conflict between dead code elimination and ftrace for GCC <= 4.7
- fix external module build with CONFIG_STACKPROTECTOR
- remove unused code
* tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kbuild: mark prepare0 as PHONY to fix external module build
openrisc: remove unneeded code in arch/openrisc/Makefile
nds32: remove unneeded code in arch/nds32/Makefile
ia64: remove redundant 'export AWK'
kbuild: remove unused archmrproper
kbuild: remove unused baseprereq
kbuild: Disable LD_DEAD_CODE_DATA_ELIMINATION with ftrace & GCC <= 4.7
kconfig: clean generated *conf-cfg files
| -rw-r--r-- | Makefile | 8 | ||||
| -rw-r--r-- | arch/h8300/Makefile | 2 | ||||
| -rw-r--r-- | arch/ia64/Makefile | 2 | ||||
| -rw-r--r-- | arch/nds32/Makefile | 8 | ||||
| -rw-r--r-- | arch/openrisc/Makefile | 3 | ||||
| -rw-r--r-- | init/Kconfig | 1 | ||||
| -rw-r--r-- | scripts/Kbuild.include | 4 | ||||
| -rw-r--r-- | scripts/kconfig/Makefile | 2 |
8 files changed, 6 insertions, 24 deletions
| @@ -955,6 +955,7 @@ ifdef CONFIG_STACK_VALIDATION | |||
| 955 | endif | 955 | endif |
| 956 | endif | 956 | endif |
| 957 | 957 | ||
| 958 | PHONY += prepare0 | ||
| 958 | 959 | ||
| 959 | ifeq ($(KBUILD_EXTMOD),) | 960 | ifeq ($(KBUILD_EXTMOD),) |
| 960 | core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ | 961 | core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ |
| @@ -1061,8 +1062,7 @@ scripts: scripts_basic scripts_dtc | |||
| 1061 | # archprepare is used in arch Makefiles and when processed asm symlink, | 1062 | # archprepare is used in arch Makefiles and when processed asm symlink, |
| 1062 | # version.h and scripts_basic is processed / created. | 1063 | # version.h and scripts_basic is processed / created. |
| 1063 | 1064 | ||
| 1064 | # Listed in dependency order | 1065 | PHONY += prepare archprepare prepare1 prepare2 prepare3 |
| 1065 | PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 | ||
| 1066 | 1066 | ||
| 1067 | # prepare3 is used to check if we are building in a separate output directory, | 1067 | # prepare3 is used to check if we are building in a separate output directory, |
| 1068 | # and if so do: | 1068 | # and if so do: |
| @@ -1360,11 +1360,11 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) | |||
| 1360 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) | 1360 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) |
| 1361 | mrproper-dirs := $(addprefix _mrproper_,scripts) | 1361 | mrproper-dirs := $(addprefix _mrproper_,scripts) |
| 1362 | 1362 | ||
| 1363 | PHONY += $(mrproper-dirs) mrproper archmrproper | 1363 | PHONY += $(mrproper-dirs) mrproper |
| 1364 | $(mrproper-dirs): | 1364 | $(mrproper-dirs): |
| 1365 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) | 1365 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) |
| 1366 | 1366 | ||
| 1367 | mrproper: clean archmrproper $(mrproper-dirs) | 1367 | mrproper: clean $(mrproper-dirs) |
| 1368 | $(call cmd,rmdirs) | 1368 | $(call cmd,rmdirs) |
| 1369 | $(call cmd,rmfiles) | 1369 | $(call cmd,rmfiles) |
| 1370 | 1370 | ||
diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index 4003ddc616e1..f801f3708a89 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile | |||
| @@ -37,8 +37,6 @@ libs-y += arch/$(ARCH)/lib/ | |||
| 37 | 37 | ||
| 38 | boot := arch/h8300/boot | 38 | boot := arch/h8300/boot |
| 39 | 39 | ||
| 40 | archmrproper: | ||
| 41 | |||
| 42 | archclean: | 40 | archclean: |
| 43 | $(Q)$(MAKE) $(clean)=$(boot) | 41 | $(Q)$(MAKE) $(clean)=$(boot) |
| 44 | 42 | ||
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index 320d86f192ee..171290f9f1de 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
| @@ -16,8 +16,6 @@ KBUILD_DEFCONFIG := generic_defconfig | |||
| 16 | NM := $(CROSS_COMPILE)nm -B | 16 | NM := $(CROSS_COMPILE)nm -B |
| 17 | READELF := $(CROSS_COMPILE)readelf | 17 | READELF := $(CROSS_COMPILE)readelf |
| 18 | 18 | ||
| 19 | export AWK | ||
| 20 | |||
| 21 | CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__ | 19 | CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__ |
| 22 | 20 | ||
| 23 | OBJCOPYFLAGS := --strip-all | 21 | OBJCOPYFLAGS := --strip-all |
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile index 0a935c136ec2..ac3482882cf9 100644 --- a/arch/nds32/Makefile +++ b/arch/nds32/Makefile | |||
| @@ -3,9 +3,6 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S | |||
| 3 | 3 | ||
| 4 | KBUILD_DEFCONFIG := defconfig | 4 | KBUILD_DEFCONFIG := defconfig |
| 5 | 5 | ||
| 6 | comma = , | ||
| 7 | |||
| 8 | |||
| 9 | ifdef CONFIG_FUNCTION_TRACER | 6 | ifdef CONFIG_FUNCTION_TRACER |
| 10 | arch-y += -malways-save-lp -mno-relax | 7 | arch-y += -malways-save-lp -mno-relax |
| 11 | endif | 8 | endif |
| @@ -54,8 +51,6 @@ endif | |||
| 54 | boot := arch/nds32/boot | 51 | boot := arch/nds32/boot |
| 55 | core-y += $(boot)/dts/ | 52 | core-y += $(boot)/dts/ |
| 56 | 53 | ||
| 57 | .PHONY: FORCE | ||
| 58 | |||
| 59 | Image: vmlinux | 54 | Image: vmlinux |
| 60 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 55 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
| 61 | 56 | ||
| @@ -68,9 +63,6 @@ prepare: vdso_prepare | |||
| 68 | vdso_prepare: prepare0 | 63 | vdso_prepare: prepare0 |
| 69 | $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h | 64 | $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h |
| 70 | 65 | ||
| 71 | CLEAN_FILES += include/asm-nds32/constants.h* | ||
| 72 | |||
| 73 | # We use MRPROPER_FILES and CLEAN_FILES now | ||
| 74 | archclean: | 66 | archclean: |
| 75 | $(Q)$(MAKE) $(clean)=$(boot) | 67 | $(Q)$(MAKE) $(clean)=$(boot) |
| 76 | 68 | ||
diff --git a/arch/openrisc/Makefile b/arch/openrisc/Makefile index 70e06d34006c..bf10141c7426 100644 --- a/arch/openrisc/Makefile +++ b/arch/openrisc/Makefile | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | KBUILD_DEFCONFIG := or1ksim_defconfig | 20 | KBUILD_DEFCONFIG := or1ksim_defconfig |
| 21 | 21 | ||
| 22 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 22 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
| 23 | LDFLAGS_vmlinux := | ||
| 24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | 23 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) |
| 25 | 24 | ||
| 26 | KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ | 25 | KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ |
| @@ -50,5 +49,3 @@ else | |||
| 50 | BUILTIN_DTB := n | 49 | BUILTIN_DTB := n |
| 51 | endif | 50 | endif |
| 52 | core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/ | 51 | core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/ |
| 53 | |||
| 54 | all: vmlinux | ||
diff --git a/init/Kconfig b/init/Kconfig index d47cb77a220e..513fa544a134 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
| @@ -1124,6 +1124,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION | |||
| 1124 | bool "Dead code and data elimination (EXPERIMENTAL)" | 1124 | bool "Dead code and data elimination (EXPERIMENTAL)" |
| 1125 | depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION | 1125 | depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION |
| 1126 | depends on EXPERT | 1126 | depends on EXPERT |
| 1127 | depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800) | ||
| 1127 | depends on $(cc-option,-ffunction-sections -fdata-sections) | 1128 | depends on $(cc-option,-ffunction-sections -fdata-sections) |
| 1128 | depends on $(ld-option,--gc-sections) | 1129 | depends on $(ld-option,--gc-sections) |
| 1129 | help | 1130 | help |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 525bff667a52..30816037036e 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
| @@ -24,10 +24,6 @@ depfile = $(subst $(comma),_,$(dot-target).d) | |||
| 24 | basetarget = $(basename $(notdir $@)) | 24 | basetarget = $(basename $(notdir $@)) |
| 25 | 25 | ||
| 26 | ### | 26 | ### |
| 27 | # filename of first prerequisite with directory and extension stripped | ||
| 28 | baseprereq = $(basename $(notdir $<)) | ||
| 29 | |||
| 30 | ### | ||
| 31 | # Escape single quote for use in echo statements | 27 | # Escape single quote for use in echo statements |
| 32 | escsq = $(subst $(squote),'\$(squote)',$1) | 28 | escsq = $(subst $(squote),'\$(squote)',$1) |
| 33 | 29 | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index c05ab001b54c..181973509a05 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -206,4 +206,4 @@ filechk_conf_cfg = $(CONFIG_SHELL) $< | |||
| 206 | $(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE | 206 | $(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE |
| 207 | $(call filechk,conf_cfg) | 207 | $(call filechk,conf_cfg) |
| 208 | 208 | ||
| 209 | clean-files += conf-cfg | 209 | clean-files += *conf-cfg |
