linux/arch/um
Masahiro Yamada cef4f57980 um: let 'make clean' properly clean underlying SUBARCH as well
[ Upstream commit ab09da7570 ]

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 <skhan@linuxfoundation.org>
Closes: https://lore.kernel.org/lkml/20250502172459.14175-1-skhan@linuxfoundation.org/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-06-04 14:43:52 +02:00
..
configs um: Fix hostaudio build errors 2023-08-19 23:30:22 +02:00
drivers um: ubd: Initialize ubd's disk pointer in ubd_add 2024-12-05 14:03:03 +01:00
include Revert "um: work around sched_yield not yielding in time-travel mode" 2025-05-18 08:24:57 +02:00
kernel um: Update min_low_pfn to match changes in uml_reserved 2025-05-29 11:02:14 +02:00
os-Linux um: remove copy_from_kernel_nofault_allowed 2025-04-10 14:39:25 +02:00
scripts um: prevent user code in modules 2023-04-20 23:06:38 +02:00
.gitignore um: gitignore: Add kernel/capflags.c 2021-12-21 21:22:43 +01:00
Kbuild um: use obj-y to descend into arch/um/*/ 2023-08-26 22:41:34 +02:00
Kconfig um: remove ARCH_NO_PREEMPT_DYNAMIC 2024-09-12 20:12:37 +02:00
Kconfig.debug um: Disable CONFIG_GCOV with MODULES 2021-04-15 23:10:33 +02:00
Makefile um: let 'make clean' properly clean underlying SUBARCH as well 2025-06-04 14:43:52 +02:00
Makefile-os-Linux x86, um: get rid of arch/um/os symlink 2008-10-22 22:55:22 -07:00
Makefile-skas arch: um: Add Clang coverage support 2024-01-05 00:30:35 +01:00