From nobody Tue Dec 16 07:27:06 2025 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 CFB7820C48A; Wed, 7 May 2025 07:49:42 +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=1746604183; cv=none; b=ErczcqtpNbsXgD1MP5FllQ6za4hwDDXXDbkysYM74w4voQE+wi7QMOV5iGV0/AmKR5BhQ2I5wLs1gLqEF9UMyQhV+kFrwV09/K6Xbdzhd22NfdEEZFHpB6dMdIoA9tMm6d3d6bOv309ZvUqTcz0+NKHmMQWLbarwDzd2wPOcbJk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746604183; c=relaxed/simple; bh=aKVeXsVP1cmcQfXqQm3R+VpM9vL3zBUMDZE6Vqz1Ib0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=djE64AKFViJThgAiDZF1ewROVsSBcpxki5a/OxSSeSDCOnYqiDTTRAQtxyhA38xMYyy5q2z+GkThbj4nrk5n9b2eR3j99cdl5uOhUgY5qW6vY3Of2v1QOxt2VDOHo+c75MA67uzaefXyowObmyqbCNl5EzKqeAQtha3ugC44fd0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TmRVgbtw; 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="TmRVgbtw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BA50C4CEE7; Wed, 7 May 2025 07:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1746604182; bh=aKVeXsVP1cmcQfXqQm3R+VpM9vL3zBUMDZE6Vqz1Ib0=; h=From:To:Cc:Subject:Date:From; b=TmRVgbtwaSR0HjomtUmH68y8XAFpWC7aZdgMOanCq7iAvSBE3Y7b8GevOKidbrHdt I9EjH22spCzKxxSUQVsmpX54b2ZwCpHtHEXdY7OJ7Pa7jSxfwVXWds8V15ybapQ2yr xhAWUdNH+5IzqwnRprjbAALxBg3F0bqfiTHeLgwaHz8SjPUl9JkBht4mQSefAEhnaB cwkMV9EUC5Yzm/YZy3ymc6dEy7KjLIu9WMApSZr1MiC6P04OL284KUT9zFJ5CU0zEf Ag/qa4jq5jdGjEsXaxaLj+Xtasl2riVoHXhg+8eiGwHT0x5OdPSnYLq1yLVX7ITyeR SddZSSct/WJCg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Shuah Khan , Anton Ivanov , Johannes Berg , Richard Weinberger , linux-um@lists.infradead.org Subject: [PATCH] um: let 'make clean' properly clean underlying SUBARCH as well Date: Wed, 7 May 2025 16:49:33 +0900 Message-ID: <20250507074936.486648-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Building the kernel with O=3D is affected by stale in-tree build artifacts. So, if the source tree is not clean, Kbuild displays the following: $ make ARCH=3Dum O=3Dbuild defconfig make[1]: Entering directory '/.../linux/build' *** *** The source tree is not clean, please run 'make ARCH=3Dum 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=3Dum clean' recurse into the SUBARCH directory. Reported-by: Shuah Khan Closes: https://lore.kernel.org/lkml/20250502172459.14175-1-skhan@linuxfoun= dation.org/ Signed-off-by: Masahiro Yamada Acked-by: Johannes Berg Reviewed-by: David Gow Reviewed-by: Shuah Khan --- arch/um/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/um/Makefile b/arch/um/Makefile index 1d36a613aad8..9ed792e565c9 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -154,5 +154,6 @@ MRPROPER_FILES +=3D $(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=3D$(HEADER_ARCH) clean =20 export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH --=20 2.43.0