From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A68F4C3ABDD for ; Mon, 19 May 2025 21:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QOW+QxXcETzEMpw2yH/AJFAaYQ77fIG7Lk9pXZ6w60g=; b=zzYvdTjH9mOvHqIVOuh9UZ0KE7 Wrx4yGs3V6jFS6jOXcDXByt2+YkQESAMDAIEodv45fRFKrxedpL1B8gfCXlDW45UF3Sj1SMOHE7WE xpufHO5cu3XkL/lAWbuNrQYowfSKoBD5i4Gr1oQ+Or1f5zkNgF1ez6IQgrwutdXKqJenWhYRiKjRw mJLg10wguGuUVBNF6yMLx9XpRqPGrHcW6nNVdi/6stX52a9rPyUEUHuwgAWRuoaWEl7sVijYY4cJJ oCEZ9JChXDRLIwka+tkWE/SPF24Lysk/4PIWYCE3CvPMLlXq4lgyvYspZqfKYeHQoOVtwTOeiEvSL XEmlfNSg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uH84H-0000000AYYS-1ZWd; Mon, 19 May 2025 21:30:41 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uH7wc-0000000AWEd-2ali for linux-um@lists.infradead.org; Mon, 19 May 2025 21:22:48 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 52983447BF; Mon, 19 May 2025 21:22:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7416C4CEED; Mon, 19 May 2025 21:22:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747689766; bh=8xcNgCbKv/2uMp8vF8NpZA2VkHV3QGDF3Y86ogSPFHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZaTF8YM397TSGSJiDfTHmblP1tXCR+x2CoQkQw42YNHLXyfQtnIBSdIhgMYZG6fYF oQJ4iMk9DbFqIoXT47oS3xj+YK69/A2VZK6sB08exDzyl1ZLGp6VZ5e5E4FrBEH1lu 7UznBfQqQ9J/3rVSbraDq5ZI5mGd9ffXCYTsLYkqtLRZ2KdpsA5x90XrdedFoMGKtA t/bD5sU+55nDEGy7XCz7cJN3IavgZAfATWb3ZEIBdnw1EXefCuRFIeq1by8QXMfhNa ydN4FgFwLfi+a/C7/hU/Cr5GtzUEXCkj7MVtUIV+M9/FuMMSBtLxIdNJhNjSGA81yb UC8Dob8jH/anw== From: Sasha Levin To: patches@lists.linux.dev, stable@vger.kernel.org Cc: Masahiro Yamada , Shuah Khan , Johannes Berg , David Gow , Sasha Levin , jdike@addtoit.com, richard@nod.at, anton.ivanov@cambridgegreys.com, linux-um@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 05/11] um: let 'make clean' properly clean underlying SUBARCH as well Date: Mon, 19 May 2025 17:22:31 -0400 Message-Id: <20250519212237.1986368-5-sashal@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250519212237.1986368-1-sashal@kernel.org> References: <20250519212237.1986368-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.91 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250519_142246_677526_17F9D8B0 X-CRM114-Status: GOOD ( 11.25 ) X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.org From: Masahiro Yamada [ Upstream commit ab09da75700e9d25c7dfbc7f7934920beb5e39b9 ] Building the kernel with O= is affected by stale in-tree build artifacts. So, if the source tree is not clean, Kbuild displays the following: $ make ARCH=um O=build defconfig make[1]: Entering directory '/.../linux/build' *** *** The source tree is not clean, please run 'make ARCH=um mrproper' *** in /.../linux *** make[2]: *** [/.../linux/Makefile:673: outputmakefile] Error 1 make[1]: *** [/.../linux/Makefile:248: __sub-make] Error 2 make[1]: Leaving directory '/.../linux/build' make: *** [Makefile:248: __sub-make] Error 2 Usually, running 'make mrproper' is sufficient for cleaning the source tree for out-of-tree builds. However, building UML generates build artifacts not only in arch/um/, but also in the SUBARCH directory (i.e., arch/x86/). If in-tree stale files remain under arch/x86/, Kbuild will reuse them instead of creating new ones under the specified build directory. This commit makes 'make ARCH=um clean' recurse into the SUBARCH directory. Reported-by: Shuah Khan Closes: https://lore.kernel.org/lkml/20250502172459.14175-1-skhan@linuxfoundation.org/ Signed-off-by: Masahiro Yamada Acked-by: Johannes Berg Reviewed-by: David Gow Reviewed-by: Shuah Khan Signed-off-by: Sasha Levin --- arch/um/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/um/Makefile b/arch/um/Makefile index 34957dcb88b9c..744c5d0bdeb8f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -151,5 +151,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated archclean: @find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '*.gcov' \) -type f -print | xargs rm -f + $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH -- 2.39.5