Skip to content

Commit

Permalink
Merge tag 'kbuild-fixes-v5.0' of git://git.kernel.org/pub/scm/linux/k…
Browse files Browse the repository at this point in the history
…ernel/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
  • Loading branch information
torvalds committed Jan 17, 2019
2 parents d471c4d + e00d888 commit e4484a4
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ ifdef CONFIG_STACK_VALIDATION
endif
endif

PHONY += prepare0

ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
Expand Down Expand Up @@ -1061,8 +1062,7 @@ scripts: scripts_basic scripts_dtc
# archprepare is used in arch Makefiles and when processed asm symlink,
# version.h and scripts_basic is processed / created.

# Listed in dependency order
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
PHONY += prepare archprepare prepare1 prepare2 prepare3

# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
Expand Down Expand Up @@ -1360,11 +1360,11 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
mrproper-dirs := $(addprefix _mrproper_,scripts)

PHONY += $(mrproper-dirs) mrproper archmrproper
PHONY += $(mrproper-dirs) mrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)

mrproper: clean archmrproper $(mrproper-dirs)
mrproper: clean $(mrproper-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)

Expand Down
2 changes: 0 additions & 2 deletions arch/h8300/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ libs-y += arch/$(ARCH)/lib/

boot := arch/h8300/boot

archmrproper:

archclean:
$(Q)$(MAKE) $(clean)=$(boot)

Expand Down
2 changes: 0 additions & 2 deletions arch/ia64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ KBUILD_DEFCONFIG := generic_defconfig
NM := $(CROSS_COMPILE)nm -B
READELF := $(CROSS_COMPILE)readelf

export AWK

CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__

OBJCOPYFLAGS := --strip-all
Expand Down
8 changes: 0 additions & 8 deletions arch/nds32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S

KBUILD_DEFCONFIG := defconfig

comma = ,


ifdef CONFIG_FUNCTION_TRACER
arch-y += -malways-save-lp -mno-relax
endif
Expand Down Expand Up @@ -54,8 +51,6 @@ endif
boot := arch/nds32/boot
core-y += $(boot)/dts/

.PHONY: FORCE

Image: vmlinux
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@

Expand All @@ -68,9 +63,6 @@ prepare: vdso_prepare
vdso_prepare: prepare0
$(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:
$(Q)$(MAKE) $(clean)=$(boot)

Expand Down
3 changes: 0 additions & 3 deletions arch/openrisc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
KBUILD_DEFCONFIG := or1ksim_defconfig

OBJCOPYFLAGS := -O binary -R .note -R .comment -S
LDFLAGS_vmlinux :=
LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)

KBUILD_CFLAGS += -pipe -ffixed-r10 -D__linux__
Expand Down Expand Up @@ -50,5 +49,3 @@ else
BUILTIN_DTB := n
endif
core-$(BUILTIN_DTB) += arch/openrisc/boot/dts/

all: vmlinux
1 change: 1 addition & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,7 @@ config LD_DEAD_CODE_DATA_ELIMINATION
bool "Dead code and data elimination (EXPERIMENTAL)"
depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
depends on EXPERT
depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800)
depends on $(cc-option,-ffunction-sections -fdata-sections)
depends on $(ld-option,--gc-sections)
help
Expand Down
4 changes: 0 additions & 4 deletions scripts/Kbuild.include
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ depfile = $(subst $(comma),_,$(dot-target).d)
# filename of target with directory and extension stripped
basetarget = $(basename $(notdir $@))

###
# filename of first prerequisite with directory and extension stripped
baseprereq = $(basename $(notdir $<))

###
# Escape single quote for use in echo statements
escsq = $(subst $(squote),'\$(squote)',$1)
Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ filechk_conf_cfg = $(CONFIG_SHELL) $<
$(obj)/%conf-cfg: $(src)/%conf-cfg.sh FORCE
$(call filechk,conf_cfg)

clean-files += conf-cfg
clean-files += *conf-cfg

0 comments on commit e4484a4

Please sign in to comment.