Skip to content

Commit b80c623

Browse files
masahir0ymehmetb0
authored andcommitted
kbuild: suppress stdout from merge_config for silent builds
BugLink: https://bugs.launchpad.net/bugs/2104873 [ Upstream commit 1f937a4 ] merge_config does not respect the Make's -s (--silent) option. Let's sink the stdout from merge_config for silent builds. This commit does not cater to the direct invocation of merge_config.sh (e.g. arch/mips/Makefile). Reported-by: Leon Romanovsky <leon@kernel.org> Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/ Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Noah Wager <noah.wager@canonical.com>
1 parent 09f6dfa commit b80c623

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

scripts/Makefile.defconf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# SPDX-License-Identifier: GPL-2.0
22
# Configuration heplers
33

4+
cmd_merge_fragments = \
5+
$(srctree)/scripts/kconfig/merge_config.sh \
6+
$4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \
7+
$(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
8+
49
# Creates 'merged defconfigs'
510
# ---------------------------------------------------------------------------
611
# Usage:
712
# $(call merge_into_defconfig,base_config,config_fragment1 config_fragment2 ...)
813
#
914
# Input config fragments without '.config' suffix
1015
define merge_into_defconfig
11-
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
12-
-m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
13-
$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
16+
$(call cmd,merge_fragments,$1,$2)
1417
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
1518
endef
1619

@@ -22,8 +25,6 @@ endef
2225
#
2326
# Input config fragments without '.config' suffix
2427
define merge_into_defconfig_override
25-
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
26-
-Q -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
27-
$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
28+
$(call cmd,merge_fragments,$1,$2,-Q)
2829
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
2930
endef

scripts/kconfig/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,11 @@ configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARC
105105
all-config-fragments = $(call configfiles,*.config)
106106
config-fragments = $(call configfiles,$@)
107107

108+
cmd_merge_fragments = $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
109+
108110
%.config: $(obj)/conf
109111
$(if $(config-fragments),, $(error $@ fragment does not exists on this architecture))
110-
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
112+
$(call cmd,merge_fragments)
111113
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
112114

113115
PHONY += tinyconfig

0 commit comments

Comments
 (0)