Skip to content

Commit 6750691

Browse files
committed
Merge tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Restore the original behavior of scripts/setlocalversion when LOCALVERSION is set to empty. - Show Kconfig prompts even for 'make -s' - Fix the combination of COFNIG_LTO_CLANG=y and CONFIG_MODVERSIONS=y for older GNU Make versions * tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: Documentation: Fix intiramfs script name Kbuild: lto: fix module versionings mismatch in GNU make 3.X kbuild: do not suppress Kconfig prompts for silent build scripts/setlocalversion: fix a bug when LOCALVERSION is empty
2 parents 1d67c8d + 5e60f36 commit 6750691

File tree

5 files changed

+19
-15
lines changed

5 files changed

+19
-15
lines changed

Documentation/driver-api/early-userspace/early_userspace_support.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ early userspace image can be built by an unprivileged user.
6969

7070
As a technical note, when directories and files are specified, the
7171
entire CONFIG_INITRAMFS_SOURCE is passed to
72-
usr/gen_initramfs_list.sh. This means that CONFIG_INITRAMFS_SOURCE
72+
usr/gen_initramfs.sh. This means that CONFIG_INITRAMFS_SOURCE
7373
can really be interpreted as any legal argument to
74-
gen_initramfs_list.sh. If a directory is specified as an argument then
74+
gen_initramfs.sh. If a directory is specified as an argument then
7575
the contents are scanned, uid/gid translation is performed, and
7676
usr/gen_init_cpio file directives are output. If a directory is
77-
specified as an argument to usr/gen_initramfs_list.sh then the
77+
specified as an argument to usr/gen_initramfs.sh then the
7878
contents of the file are simply copied to the output. All of the output
7979
directives from directory scanning and file contents copying are
8080
processed by usr/gen_init_cpio.
8181

82-
See also 'usr/gen_initramfs_list.sh -h'.
82+
See also 'usr/gen_initramfs.sh -h'.
8383

8484
Where's this all leading?
8585
=========================

Documentation/filesystems/ramfs-rootfs-initramfs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Documentation/driver-api/early-userspace/early_userspace_support.rst for more de
170170
The kernel does not depend on external cpio tools. If you specify a
171171
directory instead of a configuration file, the kernel's build infrastructure
172172
creates a configuration file from that directory (usr/Makefile calls
173-
usr/gen_initramfs_list.sh), and proceeds to package up that directory
173+
usr/gen_initramfs.sh), and proceeds to package up that directory
174174
using the config file (by feeding it to usr/gen_init_cpio, which is created
175175
from usr/gen_init_cpio.c). The kernel's build-time cpio creation code is
176176
entirely self-contained, and the kernel's boot-time extractor is also

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,12 @@ $(KCONFIG_CONFIG):
728728
# This exploits the 'multi-target pattern rule' trick.
729729
# The syncconfig should be executed only once to make all the targets.
730730
# (Note: use the grouped target '&:' when we bump to GNU Make 4.3)
731-
quiet_cmd_syncconfig = SYNC $@
732-
cmd_syncconfig = $(MAKE) -f $(srctree)/Makefile syncconfig
733-
731+
#
732+
# Do not use $(call cmd,...) here. That would suppress prompts from syncconfig,
733+
# so you cannot notice that Kconfig is waiting for the user input.
734734
%/config/auto.conf %/config/auto.conf.cmd %/generated/autoconf.h: $(KCONFIG_CONFIG)
735-
+$(call cmd,syncconfig)
735+
$(Q)$(kecho) " SYNC $@"
736+
$(Q)$(MAKE) -f $(srctree)/Makefile syncconfig
736737
else # !may-sync-config
737738
# External modules and some install targets need include/generated/autoconf.h
738739
# and include/config/auto.conf but do not care if they are up-to-date.

scripts/Makefile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ ifeq ($(CONFIG_LTO_CLANG) $(CONFIG_MODVERSIONS),y y)
386386
cmd_update_lto_symversions = \
387387
388388
$(foreach n, $(filter-out FORCE,$^), \
389-
$(if $(wildcard $(n).symversions), \
389+
$(if $(shell test -s $(n).symversions && echo y), \
390390
; cat $(n).symversions >> [email protected]))
391391
else
392392
cmd_update_lto_symversions = echo >/dev/null

scripts/setlocalversion

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,14 @@ res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
131131
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
132132
# full scm version string
133133
res="$res$(scm_version)"
134-
elif [ -z "${LOCALVERSION}" ]; then
135-
# append a plus sign if the repository is not in a clean
136-
# annotated or signed tagged state (as git describe only
137-
# looks at signed or annotated tags - git tag -a/-s) and
138-
# LOCALVERSION= is not specified
134+
elif [ "${LOCALVERSION+set}" != "set" ]; then
135+
# If the variable LOCALVERSION is not set, append a plus
136+
# sign if the repository is not in a clean annotated or
137+
# signed tagged state (as git describe only looks at signed
138+
# or annotated tags - git tag -a/-s).
139+
#
140+
# If the variable LOCALVERSION is set (including being set
141+
# to an empty string), we don't want to append a plus sign.
139142
scm=$(scm_version --short)
140143
res="$res${scm:++}"
141144
fi

0 commit comments

Comments
 (0)