From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 019C42135C2; Tue, 4 Feb 2025 01:17:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738631865; cv=none; b=qjMBhCHkts84Y7IDpLa5G89T9suE4yC4cFXMEK+8ZPTgKV5Tc5rJIUKRPZqVkqqdzJue6aF42vhJUbMRkGSGZCpoK9fBcxD7uvOGrVcVRiVX1kZGyFN8Cb7uj+9HXAAeficbkq8bUZO/f5sFAtcceDFfcDYbgh+om5uKxhiVZXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738631865; c=relaxed/simple; bh=rE3MGdpZlRGV8bgwGo6eyO42glJQFq9ze2CSY9FcHSA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AnxkyaxqawS+0oE3BtybH0uHpH2sU1K8Zum/avG29N9FQhMv4VdExM0OfQ+47JlrUQtVdQCW0DxpBa6s2vgYw8EKPT7Yoo+PDCZHOuhgUQwhu48taO9+fSEHJP/83FoP+d5UW2ebxhjkNE06hsWPObfmmwO0tsMU8O0pCK6GOwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rRcEkAbS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rRcEkAbS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05A5EC4CEE0; Tue, 4 Feb 2025 01:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1738631864; bh=rE3MGdpZlRGV8bgwGo6eyO42glJQFq9ze2CSY9FcHSA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRcEkAbSY+rSSg6ziM7sff+iggorAW7c7rfFVCvZbH3pU/F3w/joXukZZCknbSQLu OI7veBOl6qlMPd712YKZBtJD+fbWDpaNiWB3l2+LHbIGRfKB6LxP7BbP7AL8KV2VVW MN7yoWXI23BD0cL8kslOLFiQyoZlUmCDNOf+8O6vRAOW2Vi+n5PegLdv3MlcePBtcy xERWiCDf8xzku5Me7S/rNIfaAKV+cshRyGgSm9EnAOv+ZhBvjJym441N60f2ps42/b CKbH2CU+G4JDljnC1mRy2rzRwmb9F2onzAxhvuORQjt+cWoFuxhQiQJepR/F5vcy9R ENduteWRCAM1w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Masahiro Yamada , Leon Romanovsky , Nathan Chancellor , Sasha Levin , linux-kbuild@vger.kernel.org Subject: [PATCH AUTOSEL 6.13 3/6] kbuild: suppress stdout from merge_config for silent builds Date: Mon, 3 Feb 2025 20:17:30 -0500 Message-Id: <20250204011736.2206691-3-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250204011736.2206691-1-sashal@kernel.org> References: <20250204011736.2206691-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.13.1 Content-Transfer-Encoding: 8bit From: Masahiro Yamada [ Upstream commit 1f937a4bcb0472015818f30f4d3c5546d3f09933 ] 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 Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/ Signed-off-by: Masahiro Yamada Tested-by: Leon Romanovsky Reviewed-by: Nathan Chancellor Signed-off-by: Sasha Levin --- scripts/Makefile.defconf | 13 +++++++------ scripts/kconfig/Makefile | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf index 226ea3df3b4b4..a44307f08e9d6 100644 --- a/scripts/Makefile.defconf +++ b/scripts/Makefile.defconf @@ -1,6 +1,11 @@ # SPDX-License-Identifier: GPL-2.0 # Configuration heplers +cmd_merge_fragments = \ + $(srctree)/scripts/kconfig/merge_config.sh \ + $4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \ + $(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config) + # Creates 'merged defconfigs' # --------------------------------------------------------------------------- # Usage: @@ -8,9 +13,7 @@ # # Input config fragments without '.config' suffix define merge_into_defconfig - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ - -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \ - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config) + $(call cmd,merge_fragments,$1,$2) +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig endef @@ -22,8 +25,6 @@ endef # # Input config fragments without '.config' suffix define merge_into_defconfig_override - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \ - -Q -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \ - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config) + $(call cmd,merge_fragments,$1,$2,-Q) +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig endef diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index a0a0be38cbdc1..fb50bd4f4103f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -105,9 +105,11 @@ configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARC all-config-fragments = $(call configfiles,*.config) config-fragments = $(call configfiles,$@) +cmd_merge_fragments = $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments) + %.config: $(obj)/conf $(if $(config-fragments),, $(error $@ fragment does not exists on this architecture)) - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments) + $(call cmd,merge_fragments) $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig PHONY += tinyconfig -- 2.39.5