Merge tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Jan 2022 09:15:19 +0000 (11:15 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 19 Jan 2022 09:15:19 +0000 (11:15 +0200)
Pull Kbuild updates from Masahiro Yamada:

 - Add new kconfig target 'make mod2noconfig', which will be useful to
   speed up the build and test iteration.

 - Raise the minimum supported version of LLVM to 11.0.0

 - Refactor certs/Makefile

 - Change the format of include/config/auto.conf to stop double-quoting
   string type CONFIG options.

 - Fix ARCH=sh builds in dash

 - Separate compression macros for general purposes (cmd_bzip2 etc.) and
   the ones for decompressors (cmd_bzip2_with_size etc.)

 - Misc Makefile cleanups

* tag 'kbuild-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
  kbuild: add cmd_file_size
  arch: decompressor: remove useless vmlinux.bin.all-y
  kbuild: rename cmd_{bzip2,lzma,lzo,lz4,xzkern,zstd22}
  kbuild: drop $(size_append) from cmd_zstd
  sh: rename suffix-y to suffix_y
  doc: kbuild: fix default in `imply` table
  microblaze: use built-in function to get CPU_{MAJOR,MINOR,REV}
  certs: move scripts/extract-cert to certs/
  kbuild: do not quote string values in include/config/auto.conf
  kbuild: do not include include/config/auto.conf from shell scripts
  certs: simplify $(srctree)/ handling and remove config_filename macro
  kbuild: stop using config_filename in scripts/Makefile.modsign
  certs: remove misleading comments about GCC PR
  certs: refactor file cleaning
  certs: remove unneeded -I$(srctree) option for system_certificates.o
  certs: unify duplicated cmd_extract_certs and improve the log
  certs: use $< and $@ to simplify the key generation rule
  kbuild: remove headers_check stub
  kbuild: move headers_check.pl to usr/include/
  certs: use if_changed to re-generate the key when the key type is changed
  ...

16 files changed:
1  2 
Documentation/process/changes.rst
MAINTAINERS
Makefile
arch/Kconfig
arch/arm/Kconfig.debug
arch/arm/boot/compressed/Makefile
arch/mips/boot/compressed/Makefile
arch/parisc/boot/compressed/Makefile
arch/x86/boot/compressed/Makefile
drivers/acpi/Makefile
include/linux/slab.h
init/Kconfig
scripts/Makefile
scripts/Makefile.lib
scripts/link-vmlinux.sh
scripts/remove-stale-files

Simple merge
diff --cc MAINTAINERS
Simple merge
diff --cc Makefile
Simple merge
diff --cc arch/Kconfig
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc init/Kconfig
Simple merge
index b082d2f9335746211a8c58da6afe9b91dc6178a6,e198b22dc4764b69337f93c0ff93fee93038021d..ecd3acacd0ec5209569400851e8832e8c295d809
@@@ -12,17 -9,12 +9,13 @@@ hostprogs-always-$(BUILD_C_RECORDMCOUNT
  hostprogs-always-$(CONFIG_BUILDTIME_TABLE_SORT)               += sorttable
  hostprogs-always-$(CONFIG_ASN1)                               += asn1_compiler
  hostprogs-always-$(CONFIG_MODULE_SIG_FORMAT)          += sign-file
- hostprogs-always-$(CONFIG_SYSTEM_TRUSTED_KEYRING)     += extract-cert
  hostprogs-always-$(CONFIG_SYSTEM_EXTRA_CERTIFICATE)   += insert-sys-cert
- hostprogs-always-$(CONFIG_SYSTEM_REVOCATION_LIST)     += extract-cert
  
  HOSTCFLAGS_sorttable.o = -I$(srctree)/tools/include
 +HOSTLDLIBS_sorttable = -lpthread
  HOSTCFLAGS_asn1_compiler.o = -I$(srctree)/include
- HOSTCFLAGS_sign-file.o = $(CRYPTO_CFLAGS)
- HOSTLDLIBS_sign-file = $(CRYPTO_LIBS)
- HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
- HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
+ HOSTCFLAGS_sign-file.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
+ HOSTLDLIBS_sign-file = $(shell pkg-config --libs libcrypto 2> /dev/null || echo -lcrypto)
  
  ifdef CONFIG_UNWINDER_ORC
  ifeq ($(ARCH),x86_64)
Simple merge
index 82bc736532f15e632323b82ae6e4755646fda403,a4b61a2f65db55b4b26285f8a039f1a5ae9a6d3d..666f7bbc13ebba4d675559f785fd76f50a435f43
@@@ -127,21 -131,18 +131,21 @@@ objtool_link(
                        objtoolcmd="check"
                fi
                objtoolopt="${objtoolopt} --vmlinux"
-               if [ -z "${CONFIG_FRAME_POINTER}" ]; then
+               if ! is_enabled CONFIG_FRAME_POINTER; then
                        objtoolopt="${objtoolopt} --no-fp"
                fi
-               if [ -n "${CONFIG_GCOV_KERNEL}" ] || [ -n "${CONFIG_LTO_CLANG}" ]; then
+               if is_enabled CONFIG_GCOV_KERNEL || is_enabled CONFIG_LTO_CLANG; then
                        objtoolopt="${objtoolopt} --no-unreachable"
                fi
-               if [ -n "${CONFIG_RETPOLINE}" ]; then
+               if is_enabled CONFIG_RETPOLINE; then
                        objtoolopt="${objtoolopt} --retpoline"
                fi
-               if [ -n "${CONFIG_X86_SMAP}" ]; then
+               if is_enabled CONFIG_X86_SMAP; then
                        objtoolopt="${objtoolopt} --uaccess"
                fi
-               if [ -n "${CONFIG_SLS}" ]; then
++              if is_enabled CONFIG_SLS; then
 +                      objtoolopt="${objtoolopt} --sls"
 +              fi
                info OBJTOOL ${1}
                tools/objtool/objtool ${objtoolcmd} ${objtoolopt} ${1}
        fi
@@@ -403,10 -401,7 +404,10 @@@ if is_enabled CONFIG_DEBUG_INFO_BTF && 
        ${RESOLVE_BTFIDS} vmlinux
  fi
  
- if [ -n "${CONFIG_BUILDTIME_TABLE_SORT}" ]; then
 +info SYSMAP System.map
 +mksysmap vmlinux System.map
 +
+ if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then
        info SORTTAB vmlinux
        if ! sorttable vmlinux; then
                echo >&2 Failed to sort kernel tables
        fi
  fi
  
 -info SYSMAP System.map
 -mksysmap vmlinux System.map
 -
  # step a (see comment above)
- if [ -n "${CONFIG_KALLSYMS}" ]; then
+ if is_enabled CONFIG_KALLSYMS; then
        mksysmap ${kallsyms_vmlinux} .tmp_System.map
  
        if ! cmp -s System.map .tmp_System.map; then
index 80430b8fb617f1c717b2fa44cb57cba1fc64126e,dd230792056a57b5a4b5eb435f8c336f32f4a3f6..7adab4618035bc7e5984f4880489ef93a5c49994
@@@ -33,9 -33,6 +33,11 @@@ if [ -n "${building_out_of_srctree}" ]
        do
                rm -f arch/mips/boot/compressed/${f}
        done
 +
 +      for f in firmware.c real2.S
 +      do
 +              rm -f arch/parisc/boot/compressed/${f}
 +      done
  fi
+ rm -f scripts/extract-cert