Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+55 -21
+3 -1
Makefile
··· 264 264 $(version_h) headers headers_% archheaders archscripts \ 265 265 %asm-generic kernelversion %src-pkg dt_binding_check \ 266 266 outputmakefile 267 - no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease 267 + no-sync-config-targets := $(no-dot-config-targets) %install kernelrelease \ 268 + image_name 268 269 single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.s %.symtypes %/ 269 270 270 271 config-build := ··· 479 478 -I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \ 480 479 -I$(srctree)/include/uapi \ 481 480 -I$(objtree)/include/generated/uapi \ 481 + -include $(srctree)/include/linux/compiler-version.h \ 482 482 -include $(srctree)/include/linux/kconfig.h 483 483 484 484 # Use LINUXINCLUDE when you must reference the include/ directory.
+1 -2
arch/Kconfig
··· 632 632 def_bool y 633 633 # Clang >= 11: https://github.com/ClangBuiltLinux/linux/issues/510 634 634 depends on CC_IS_CLANG && CLANG_VERSION >= 110000 && LD_IS_LLD 635 - depends on $(success,test $(LLVM) -eq 1) 636 635 depends on $(success,test $(LLVM_IAS) -eq 1) 637 636 depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm) 638 637 depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm) 639 638 depends on ARCH_SUPPORTS_LTO_CLANG 640 639 depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT 641 - depends on !KASAN 640 + depends on !KASAN || KASAN_HW_TAGS 642 641 depends on !GCOV_KERNEL 643 642 help 644 643 The compiler and Kconfig options support building with Clang's
+14
include/linux/compiler-version.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + 3 + #ifdef __LINUX_COMPILER_VERSION_H 4 + #error "Please do not include <linux/compiler-version.h>. This is done by the build system." 5 + #endif 6 + #define __LINUX_COMPILER_VERSION_H 7 + 8 + /* 9 + * This header exists to force full rebuild when the compiler is upgraded. 10 + * 11 + * When fixdep scans this, it will find this string "CONFIG_CC_VERSION_TEXT" 12 + * and add dependency on include/config/cc/version/text.h, which is touched 13 + * by Kconfig when the version string from the compiler changes. 14 + */
-2
include/linux/kconfig.h
··· 2 2 #ifndef __LINUX_KCONFIG_H 3 3 #define __LINUX_KCONFIG_H 4 4 5 - /* CONFIG_CC_VERSION_TEXT (Do not delete this comment. See help in Kconfig) */ 6 - 7 5 #include <generated/autoconf.h> 8 6 9 7 #ifdef CONFIG_CPU_BIG_ENDIAN
+4 -4
init/Kconfig
··· 20 20 When the compiler is updated, Kconfig will be invoked. 21 21 22 22 - Ensure full rebuild when the compiler is updated 23 - include/linux/kconfig.h contains this option in the comment line so 24 - fixdep adds include/config/cc/version/text.h into the auto-generated 25 - dependency. When the compiler is updated, syncconfig will touch it 26 - and then every file will be rebuilt. 23 + include/linux/compiler-version.h contains this option in the comment 24 + line so fixdep adds include/config/cc/version/text.h into the 25 + auto-generated dependency. When the compiler is updated, syncconfig 26 + will touch it and then every file will be rebuilt. 27 27 28 28 config CC_IS_GCC 29 29 def_bool $(success,test "$(cc-name)" = GCC)
+2 -2
scripts/Makefile.lib
··· 327 327 328 328 quiet_cmd_dtc = DTC $@ 329 329 cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ 330 - $(DTC) -O $(patsubst .%,%,$(suffix $@)) -o $@ -b 0 \ 330 + $(DTC) -o $@ -b 0 \ 331 331 $(addprefix -i,$(dir $<) $(DTC_INCLUDE)) $(DTC_FLAGS) \ 332 332 -d $(depfile).dtc.tmp $(dtc-tmp) ; \ 333 333 cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ··· 352 352 endef 353 353 354 354 $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE 355 - $(call if_changed_rule,dtc,yaml) 355 + $(call if_changed_rule,dtc) 356 356 357 357 dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) 358 358
+16 -2
scripts/dummy-tools/gcc
··· 57 57 fi 58 58 59 59 if arg_contain -E "$@"; then 60 - # For scripts/gcc-version.sh; This emulates GCC 20.0.0 60 + # For scripts/cc-version.sh; This emulates GCC 20.0.0 61 61 if arg_contain - "$@"; then 62 - sed 's/^__GNUC__$/20/; s/^__GNUC_MINOR__$/0/; s/^__GNUC_PATCHLEVEL__$/0/' 62 + sed -n '/^GCC/{s/__GNUC__/20/; s/__GNUC_MINOR__/0/; s/__GNUC_PATCHLEVEL__/0/; p;}' 63 63 exit 0 64 64 else 65 65 echo "no input files" >&2 ··· 73 73 echo "%gs" 74 74 exit 0 75 75 fi 76 + 77 + # For arch/powerpc/tools/gcc-check-mprofile-kernel.sh 78 + if arg_contain -m64 "$@" && arg_contain -mlittle-endian "$@" && 79 + arg_contain -mprofile-kernel "$@"; then 80 + if ! test -t 0 && ! grep -q notrace; then 81 + echo "_mcount" 82 + fi 83 + exit 0 84 + fi 76 85 fi 77 86 78 87 # To set GCC_PLUGINS ··· 93 84 94 85 echo $plugin_dir 95 86 exit 0 87 + fi 88 + 89 + # inverted return value 90 + if arg_contain -D__SIZEOF_INT128__=0 "$@"; then 91 + exit 1 96 92 fi
+1
scripts/gcc-plugins/Makefile
··· 22 22 GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin) 23 23 24 24 plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ 25 + -include $(srctree)/include/linux/compiler-version.h \ 25 26 -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ 26 27 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ 27 28 -ggdb -Wno-narrowing -Wno-unused-variable \
+14 -8
scripts/ld-version.sh
··· 29 29 # Get the first line of the --version output. 30 30 IFS=' 31 31 ' 32 - set -- $("$@" --version) 32 + set -- $(LC_ALL=C "$@" --version) 33 33 34 34 # Split the line on spaces. 35 35 IFS=' ' ··· 44 44 elif [ "$1" = GNU -a "$2" = gold ]; then 45 45 echo "gold linker is not supported as it is not capable of linking the kernel proper." >&2 46 46 exit 1 47 - elif [ "$1" = LLD ]; then 48 - version=$2 49 - min_version=$lld_min_version 50 - name=LLD 51 - disp_name=LLD 52 47 else 53 - echo "$orig_args: unknown linker" >&2 54 - exit 1 48 + while [ $# -gt 1 -a "$1" != "LLD" ]; do 49 + shift 50 + done 51 + 52 + if [ "$1" = LLD ]; then 53 + version=$2 54 + min_version=$lld_min_version 55 + name=LLD 56 + disp_name=LLD 57 + else 58 + echo "$orig_args: unknown linker" >&2 59 + exit 1 60 + fi 55 61 fi 56 62 57 63 # Some distributions append a package release number, as in 2.34-4.fc32