Commit e4484a49 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'kbuild-fixes-v5.0' of...

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
parents d471c4df e00d8880
...@@ -955,6 +955,7 @@ ifdef CONFIG_STACK_VALIDATION ...@@ -955,6 +955,7 @@ ifdef CONFIG_STACK_VALIDATION
endif endif
endif endif
PHONY += prepare0
ifeq ($(KBUILD_EXTMOD),) ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
...@@ -1061,8 +1062,7 @@ scripts: scripts_basic scripts_dtc ...@@ -1061,8 +1062,7 @@ scripts: scripts_basic scripts_dtc
# archprepare is used in arch Makefiles and when processed asm symlink, # archprepare is used in arch Makefiles and when processed asm symlink,
# version.h and scripts_basic is processed / created. # version.h and scripts_basic is processed / created.
# Listed in dependency order PHONY += prepare archprepare prepare1 prepare2 prepare3
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# prepare3 is used to check if we are building in a separate output directory, # prepare3 is used to check if we are building in a separate output directory,
# and if so do: # and if so do:
...@@ -1360,11 +1360,11 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) ...@@ -1360,11 +1360,11 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
mrproper-dirs := $(addprefix _mrproper_,scripts) mrproper-dirs := $(addprefix _mrproper_,scripts)
PHONY += $(mrproper-dirs) mrproper archmrproper PHONY += $(mrproper-dirs) mrproper
$(mrproper-dirs): $(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
mrproper: clean archmrproper $(mrproper-dirs) mrproper: clean $(mrproper-dirs)
$(call cmd,rmdirs) $(call cmd,rmdirs)
$(call cmd,rmfiles) $(call cmd,rmfiles)
......
...@@ -37,8 +37,6 @@ libs-y += arch/$(ARCH)/lib/ ...@@ -37,8 +37,6 @@ libs-y += arch/$(ARCH)/lib/
boot := arch/h8300/boot boot := arch/h8300/boot
archmrproper:
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -16,8 +16,6 @@ KBUILD_DEFCONFIG := generic_defconfig ...@@ -16,8 +16,6 @@ KBUILD_DEFCONFIG := generic_defconfig
NM := $(CROSS_COMPILE)nm -B NM := $(CROSS_COMPILE)nm -B
READELF := $(CROSS_COMPILE)readelf READELF := $(CROSS_COMPILE)readelf
export AWK
CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__ CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
OBJCOPYFLAGS := --strip-all OBJCOPYFLAGS := --strip-all
......
...@@ -3,9 +3,6 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S ...@@ -3,9 +3,6 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
KBUILD_DEFCONFIG := defconfig KBUILD_DEFCONFIG := defconfig
comma = ,
ifdef CONFIG_FUNCTION_TRACER ifdef CONFIG_FUNCTION_TRACER
arch-y += -malways-save-lp -mno-relax arch-y += -malways-save-lp -mno-relax
endif endif
...@@ -54,8 +51,6 @@ endif ...@@ -54,8 +51,6 @@ endif
boot := arch/nds32/boot boot := arch/nds32/boot
core-y += $(boot)/dts/ core-y += $(boot)/dts/
.PHONY: FORCE
Image: vmlinux Image: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
...@@ -68,9 +63,6 @@ prepare: vdso_prepare ...@@ -68,9 +63,6 @@ prepare: vdso_prepare
vdso_prepare: prepare0 vdso_prepare: prepare0
$(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h $(Q)$(MAKE) $(build)=arch/nds32/kernel/vdso include/generated/vdso-offsets.h
CLEAN_FILES += include/asm-nds32/constants.h*
# We use MRPROPER_FILES and CLEAN_FILES now
archclean: archclean:
$(Q)$(MAKE) $(clean)=$(boot) $(Q)$(MAKE) $(clean)=$(boot)
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
KBUILD_DEFCONFIG := or1ksim_defconfig KBUILD_DEFCONFIG := or1ksim_defconfig
OBJCOPYFLAGS := -O binary -R .note -R .comment -S OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__ KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__
...@@ -50,5 +49,3 @@ else ...@@ -50,5 +49,3 @@ else
BUILTIN_DTB := n BUILTIN_DTB := n
endif endif
core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/ core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/
all: vmlinux
...@@ -1124,6 +1124,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION ...@@ -1124,6 +1124,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION
bool "Dead code and data elimination (EXPERIMENTAL)" bool "Dead code and data elimination (EXPERIMENTAL)"
depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
depends on EXPERT depends on EXPERT
depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800)
depends on $(cc-option,-ffunction-sections -fdata-sections) depends on $(cc-option,-ffunction-sections -fdata-sections)
depends on $(ld-option,--gc-sections) depends on $(ld-option,--gc-sections)
help help
......
...@@ -23,10 +23,6 @@ depfile = $(subst $(comma),_,$(dot-target).d) ...@@ -23,10 +23,6 @@ depfile = $(subst $(comma),_,$(dot-target).d)
# filename of target with directory and extension stripped # filename of target with directory and extension stripped
basetarget = $(basename $(notdir $@)) basetarget = $(basename $(notdir $@))
###
# filename of first prerequisite with directory and extension stripped
baseprereq = $(basename $(notdir $<))
### ###
# Escape single quote for use in echo statements # Escape single quote for use in echo statements
escsq = $(subst $(squote),'\$(squote)',$1) escsq = $(subst $(squote),'\$(squote)',$1)
......
...@@ -206,4 +206,4 @@ filechk_conf_cfg = $(CONFIG_SHELL) $< ...@@ -206,4 +206,4 @@ filechk_conf_cfg = $(CONFIG_SHELL) $<
$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE $(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
$(call filechk,conf_cfg) $(call filechk,conf_cfg)
clean-files += conf-cfg clean-files += *conf-cfg
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment