From patchwork Mon Jan 15 00:16:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 187996 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp1424447dyc; Sun, 14 Jan 2024 16:17:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9WZlXFgkOS1WM5oMU77ruq2medClb0VcHKZu5ibWNSKHhOKkKT4BgswkHA59lMXIefH++ X-Received: by 2002:a05:620a:3621:b0:783:1a1b:a8b6 with SMTP id da33-20020a05620a362100b007831a1ba8b6mr5300907qkb.94.1705277843735; Sun, 14 Jan 2024 16:17:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705277843; cv=none; d=google.com; s=arc-20160816; b=asq7r9i1AZ7H7ZL1xOc5/zCik/9Glv+FvOiiZArMRsZQIGPM+ly8UsFlEi8e0joSRN BHkAd1j9ITQUNfzNfSm6it8b4bYufPygbvRNPrklZsC2S9pHJOUurt5tCWojlcw5kvu3 +9yp0iMo39eI07GkPJWzoOhlq/AI6lVm7l+WvjxOdSC60yytCoEcnaOCsAuM1DPCMDGF Gn7z1ZVsUbwe7FUhnbb1ed9FZxUsL4D9cx0Wz7qIfxIpjm1Mxd17Lbt8JUU5e8jnFEJu W/WTflFatgOBjgLKqP4GcbPEzAHBgTNgl9dqcXxbZ7amD2vDAVShX9VIVIRKrpSfBnTo lo9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=+8qRzLu2QfiYFCgn0VSRgtOrUr1VXFFkr88Zi/Lqch4=; fh=yzcPeMDTNdsK0OzJh7veFSIosU9kF9GKmCNT+zJPlLA=; b=jjiPeCkFq5jLWkg6APXs0AeJeQYRAeMFT4UywedvCMpMmnItGa1ZmemnxHOTs5U1jQ I6aMr9EbPv9yjcbg3IXPdWVaPmWGghEoG6DDCxP7Hrkk3ik6MO0tbqcsJ6V3407iQcwL TGRwKjvPz0oDud0qIiC0Te/+Luq5aamSRZLhFmXL/yfds6tWHwcvoWzO8ndSlUikOUFO WcsGKLlSon2slEXoErSBXGbjeIYbalNWRDp2mHkhoNWO7jS4EDjCtAATwUwHYao5Is5R bGAwnUxExjM8qPZM0ogfxgJKwkUaf7I7ElLbxbTDMla8aa3X4w0YOk0aRnpkGOehKEu5 vAQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MCge9Hwl; spf=pass (google.com: domain of linux-kernel+bounces-25562-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25562-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id v11-20020a05620a440b00b007835e6bafe4si1278056qkp.171.2024.01.14.16.17.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jan 2024 16:17:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-25562-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MCge9Hwl; spf=pass (google.com: domain of linux-kernel+bounces-25562-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-25562-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 86CA81C20A06 for ; Mon, 15 Jan 2024 00:17:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93DC11396; Mon, 15 Jan 2024 00:17:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MCge9Hwl" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56CF17E5; Mon, 15 Jan 2024 00:17:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-50eabd1c701so9879776e87.3; Sun, 14 Jan 2024 16:17:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705277826; x=1705882626; darn=vger.kernel.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+8qRzLu2QfiYFCgn0VSRgtOrUr1VXFFkr88Zi/Lqch4=; b=MCge9Hwl1iI0rZ6OhdMElwbvnoIk3KW+tr7udKXJByQ9uERr3oHJA1WpCnJcqE2nA+ w3oP13MW9axRM+eR/YOwsbAXZjEZyMEKpr3i8aj7s2NkcSxiktxDJcYKJDzxFSnsl4+t Y81deuSVIvwivaqVyEaXw+dlTdKX4tAnZnhKTLe+59PLmshjp3s336GWsfotiKiERDSr KcgzzBWjxF5CeoTea3BNKyydDTM7UY6Puc3FM8gzXIQRJ3BsY05w+S20x2KOvHC2kCDX evkwV4gHxXsQlYpqL9UfhmNrEhvKBaSVrF96zoc7k/M7gadAaL/j7GZkRWnVIEyqmHQu sPmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705277826; x=1705882626; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+8qRzLu2QfiYFCgn0VSRgtOrUr1VXFFkr88Zi/Lqch4=; b=iADgcCXIawGUWJZ8ii8jFwXk4OocJHrZw8th0XHKtA8d/Hf4/u0Q7IHm54VLbEgg52 wrRXGcBPs+okRCiJDtb29z8WMWlBRHlOc91vQEXcEUd0jkGTmQwqjv42X0eIqEuYs5ag BTNc3Gw3vJnyBSxgq4732SoIuThVzOuQl/w7S2EEnR3h6uo4kV31eZCzHXeIalqjvGyj ax4uklbjT51N1V2zjVcjxAt8u1yewuWa2IUPLmR27+7j6moyryhBFO6+ho+VybTQNSla qXwxN+gDInwbvgEbWE1Nb2TzRujzoku4R6Aweu8z2uGJHJ5L5BNS0HaJSGWxjm0KadfJ z7Kg== X-Gm-Message-State: AOJu0YyiJcxWHkyPzdICDiVxNLSBV1OpVxNHTeZSyq+IRkcwUx4ibdcH qx3CtOIFpYubDcgJuFthVeE= X-Received: by 2002:ac2:4247:0:b0:50e:cccb:f5f2 with SMTP id m7-20020ac24247000000b0050ecccbf5f2mr1998756lfl.56.1705277826081; Sun, 14 Jan 2024 16:17:06 -0800 (PST) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id v10-20020a1709063bca00b00a2ae69cca5asm4712357ejf.144.2024.01.14.16.17.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Jan 2024 16:17:05 -0800 (PST) From: Wei Yang To: masahiroy@kernel.org, nathan@kernel.org, nicolas@fjasle.eu Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Wei Yang , Miguel Ojeda Subject: [PATCH] kbuild: take vmlinux.[ao] out of single-targets Date: Mon, 15 Jan 2024 00:16:06 +0000 Message-Id: <20240115001606.15477-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788113420500794959 X-GMAIL-MSGID: 1788113420500794959 For current kernel, when we make vmlinux.a or vmlinux.o, following message would display. $make vmlinux.o /dir/to/kernel/Makefile:1887: warning: overriding recipe for target 'vmlinux.o' /dir/to/kernel/Makefile:1138: warning: ignoring old recipe for target 'vmlinux.o' CALL scripts/checksyscalls.sh DESCEND objtool INSTALL libsubcmd_headers make[2]: Nothing to be done for 'vmlinux.o'. The reason is vmlinux.[ao] is treated as single target, while the rule is written in root Makefile. This patch fixes this by take them out of single-targets. Signed-off-by: Wei Yang CC: Masahiro Yamada CC: Miguel Ojeda CC: Nathan Chancellor --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f1b2fd977275..66fb08f6d971 100644 --- a/Makefile +++ b/Makefile @@ -280,6 +280,7 @@ no-dot-config-targets := $(clean-targets) \ no-sync-config-targets := $(no-dot-config-targets) %install modules_sign kernelrelease \ image_name single-targets := %.a %.i %.ko %.lds %.ll %.lst %.mod %.o %.rsi %.s %.symtypes %/ +no-single-targets := vmlinux.o vmlinux.a config-build := mixed-build := @@ -315,11 +316,14 @@ ifeq ($(KBUILD_EXTMOD),) endif # We cannot build single targets and the others at the same time -ifneq ($(filter $(single-targets), $(MAKECMDGOALS)),) +ifneq ($(filter-out $(no-single-targets), $(filter $(single-targets), $(MAKECMDGOALS))),) single-build := 1 ifneq ($(filter-out $(single-targets), $(MAKECMDGOALS)),) mixed-build := 1 endif + ifneq ($(filter $(no-single-targets), $(MAKECMDGOALS)),) + mixed-build := 1 + endif endif # For "make -j clean all", "make -j mrproper defconfig all", etc.