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 D79984431 for ; Wed, 15 Mar 2023 12:16:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FA76C4339C; Wed, 15 Mar 2023 12:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678882609; bh=Ksdo4gq5LleItZIZw3xOCMqb04oxUFOuAVtFrddn7UI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GXL54uRowF+CLfYrCQCa1j1Ds1g1uJmlmRZv5pfvc75R5r4vu/xECsKj2+NZksfZo EYUK3ux2j5rqMuU7IROws+x0XzUMTrKAugku69aCYDClC2Rq6Lm5VRqKrEOyYPKomz JA3oeINZ7YfGb0e8WvxjaER8c/hw4/VaSuN+RRIQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Masahiro Yamada , Sasha Levin Subject: [PATCH 4.19 21/39] kbuild: fix false-positive need-builtin calculation Date: Wed, 15 Mar 2023 13:12:35 +0100 Message-Id: <20230315115721.997810362@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230315115721.234756306@linuxfoundation.org> References: <20230315115721.234756306@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Masahiro Yamada [ Upstream commit d9f78edfd81b9e484423534360350ef7253cc888 ] The current implementation of need-builtin is false-positive, for example, in the following Makefile: obj-m := foo/ obj-y := foo/bar/ ..., where foo/built-in.a is not required. Signed-off-by: Masahiro Yamada Stable-dep-of: 2e3d0e20d845 ("ARM: dts: exynos: correct TMU phandle in Odroid HC1") Signed-off-by: Sasha Levin --- scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 64fac0ad32d6b..7635cc05fcfa3 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -541,7 +541,8 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ PHONY += $(subdir-ym) $(subdir-ym): - $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1) + $(Q)$(MAKE) $(build)=$@ \ + need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) # Add FORCE to the prequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- -- 2.39.2