Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8715ee75 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
  ...
parents 126f7051 1f2f01b1
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -802,13 +802,12 @@ KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif

ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
KBUILD_CFLAGS	+= $(call cc-option,-ffunction-sections,)
KBUILD_CFLAGS	+= $(call cc-option,-fdata-sections,)
KBUILD_CFLAGS_KERNEL	+= $(call cc-option,-ffunction-sections,)
KBUILD_CFLAGS_KERNEL	+= $(call cc-option,-fdata-sections,)
endif

# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(call shell-cached,$(CC) -print-file-name=include)
CHECKFLAGS     += $(NOSTDINC_FLAGS)

# warn about C99 declaration after statement
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
@@ -878,6 +877,12 @@ ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
LDFLAGS_vmlinux	+= $(call ld-option, -X,)
endif

# insure the checker run with the right endianness
CHECKFLAGS += $(if $(CONFIG_CPU_BIG_ENDIAN),-mbig-endian,-mlittle-endian)

# the checker needs the correct machine size
CHECKFLAGS += $(if $(CONFIG_64BIT),-m64,-m32)

# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the command line or
# set in the environment
@@ -1763,7 +1768,7 @@ quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))
# Run depmod only if we have System.map and depmod is executable
quiet_cmd_depmod = DEPMOD  $(KERNELRELEASE)
      cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
                   $(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))"
                   $(KERNELRELEASE)

# Create temporary dir for module support files
# clean it up only when building all modules
+0 −21
Original line number Diff line number Diff line
@@ -597,21 +597,6 @@ config CC_STACKPROTECTOR_AUTO

endchoice

config LD_DEAD_CODE_DATA_ELIMINATION
	bool
	help
	  Select this if the architecture wants to do dead code and
	  data elimination with the linker by compiling with
	  -ffunction-sections -fdata-sections and linking with
	  --gc-sections.

	  This requires that the arch annotates or otherwise protects
	  its external entry points from being discarded. Linker scripts
	  must also merge .text.*, .data.*, and .bss.* correctly into
	  output sections. Care must be taken not to pull in unrelated
	  sections (e.g., '.text.init'). Typically '.' in section names
	  is used to distinguish them from label names / C identifiers.

config HAVE_ARCH_WITHIN_STACK_FRAMES
	bool
	help
@@ -687,12 +672,6 @@ config MODULES_USE_ELF_REL
	  Modules only use ELF REL relocations.  Modules with ELF RELA
	  relocations will give an error.

config HAVE_UNDERSCORE_SYMBOL_PREFIX
	bool
	help
	  Some architectures generate an _ in front of C symbols; things like
	  module loading and assembly files need to know about this.

config HAVE_IRQ_EXIT_ON_IRQ_STACK
	bool
	help
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
NM := $(NM) -B

LDFLAGS_vmlinux	:= -static -N #-relax
CHECKFLAGS	+= -D__alpha__ -m64
CHECKFLAGS	+= -D__alpha__
cflags-y	:= -pipe -mno-fp-regs -ffixed-8
cflags-y	+= $(call cc-option, -fno-jump-tables)

+1 −1
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ endif
KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float

CHECKFLAGS	+= -D__arm__ -m32
CHECKFLAGS	+= -D__arm__

#Default value
head-y		:= arch/arm/kernel/head$(MMUEXT).o
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ LDFLAGS += -maarch64linux
UTS_MACHINE	:= aarch64
endif

CHECKFLAGS	+= -D__aarch64__ -m64
CHECKFLAGS	+= -D__aarch64__

ifeq ($(CONFIG_ARM64_MODULE_PLTS),y)
KBUILD_LDFLAGS_MODULE	+= -T $(srctree)/arch/arm64/kernel/module.lds
Loading