Commit e83bad7f authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'kbuild-fixes-v5.12-2' of...

Merge tag 'kbuild-fixes-v5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - avoid 'make image_name' invoking syncconfig

 - fix a couple of bugs in scripts/dummy-tools

 - fix LLD_VENDOR and locale issues in scripts/ld-version.sh

 - rebuild GCC plugins when the compiler is upgraded

 - allow LTO to be enabled with KASAN_HW_TAGS

 - allow LTO to be enabled without LLVM=1

* tag 'kbuild-fixes-v5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  kbuild: fix ld-version.sh to not be affected by locale
  kbuild: remove meaningless parameter to $(call if_changed_rule,dtc)
  kbuild: remove LLVM=1 test from HAS_LTO_CLANG
  kbuild: remove unneeded -O option to dtc
  kbuild: dummy-tools: adjust to scripts/cc-version.sh
  kbuild: Allow LTO to be selected with KASAN_HW_TAGS
  kbuild: dummy-tools: support MPROFILE_KERNEL checks for ppc
  kbuild: rebuild GCC plugins when the compiler is upgraded
  kbuild: Fix ld-version.sh script if LLD was built with LLD_VENDOR
  kbuild: dummy-tools: fix inverted tests for gcc
  kbuild: add image_name to no-sync-config-targets
parents f296bfd5 bcbcf50f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -264,7 +264,8 @@ no-dot-config-targets := $(clean-targets) \
			 $(version_h) headers headers_% archheaders archscripts \
			 %asm-generic kernelversion %src-pkg dt_binding_check \
			 outputmakefile
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease
no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \
			  image_name
single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/

config-build	:=
@@ -478,6 +479,7 @@ USERINCLUDE := \
		-I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
		-I$(srctree)/include/uapi \
		-I$(objtree)/include/generated/uapi \
                -include $(srctree)/include/linux/compiler-version.h \
                -include $(srctree)/include/linux/kconfig.h

# Use LINUXINCLUDE when you must reference the include/ directory.
+1 −2
Original line number Diff line number Diff line
@@ -632,13 +632,12 @@ config HAS_LTO_CLANG
	def_bool y
	# Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510
	depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD
	depends on $(success,test $(LLVM) -eq 1)
	depends on $(success,test $(LLVM_IAS) -eq 1)
	depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
	depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
	depends on ARCH_SUPPORTS_LTO_CLANG
	depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
	depends on !KASAN
	depends on !KASAN || KASAN_HW_TAGS
	depends on !GCOV_KERNEL
	help
	  The compiler and Kconfig options support building with Clang's
+14 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */

#ifdef  __LINUX_COMPILER_VERSION_H
#error "Please do not include <linux/compiler-version.h>. This is done by the build system."
#endif
#define __LINUX_COMPILER_VERSION_H

/*
 * This header exists to force full rebuild when the compiler is upgraded.
 *
 * When fixdep scans this, it will find this string "CONFIG_CC_VERSION_TEXT"
 * and add dependency on include/config/cc/version/text.h, which is touched
 * by Kconfig when the version string from the compiler changes.
 */
+0 −2
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@
#ifndef __LINUX_KCONFIG_H
#define __LINUX_KCONFIG_H

/* CONFIG_CC_VERSION_TEXT (Do not delete this comment. See help in Kconfig) */

#include <generated/autoconf.h>

#ifdef CONFIG_CPU_BIG_ENDIAN
+4 −4
Original line number Diff line number Diff line
@@ -20,10 +20,10 @@ config CC_VERSION_TEXT
	    When the compiler is updated, Kconfig will be invoked.

	  - Ensure full rebuild when the compiler is updated
	    include/linux/kconfig.h contains this option in the comment line so
	    fixdep adds include/config/cc/version/text.h into the auto-generated
	    dependency. When the compiler is updated, syncconfig will touch it
	    and then every file will be rebuilt.
	    include/linux/compiler-version.h contains this option in the comment
	    line so fixdep adds include/config/cc/version/text.h into the
	    auto-generated dependency. When the compiler is updated, syncconfig
	    will touch it and then every file will be rebuilt.

config CC_IS_GCC
	def_bool $(success,test "$(cc-name)" = GCC)
Loading