Re: [PATCH 03/13] x86/kbuild: Remove ancient 'arch/i386/' and 'arch/x86_64/' directory removal 'archclean' target

From: Brian Gerst
Date: Fri Jun 13 2025 - 13:13:05 EST


On Thu, May 15, 2025 at 9:28 AM Ingo Molnar <mingo@xxxxxxxxxx> wrote:
>
> We have to go back 17 years into Git history, to kernels that won't
> even build or boot with modern build environments, to come across
> the obsolete arch/i386/ and arch/x86_64/ directories.
>
> Remove some of their last functional residuals in the 'archclean' target.
>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
> Cc: Ard Biesheuvel <ardb@xxxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: David Woodhouse <dwmw@xxxxxxxxxxxx>
> Cc: H. Peter Anvin <hpa@xxxxxxxxx>
> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Cc: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx>
> Cc: Michal Marek <michal.lkml@xxxxxxxxxxx>
> ---
> arch/x86/Makefile | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/arch/x86/Makefile b/arch/x86/Makefile
> index 594723005d95..4e7ac5e4b537 100644
> --- a/arch/x86/Makefile
> +++ b/arch/x86/Makefile
> @@ -348,10 +348,6 @@ $(orc_hash_h): $(srctree)/arch/x86/include/asm/orc_types.h $(orc_hash_sh) FORCE
> archprepare: $(orc_hash_h)
> endif
>
> -archclean:
> - $(Q)rm -rf $(objtree)/arch/i386
> - $(Q)rm -rf $(objtree)/arch/x86_64
> -
> define archhelp
> echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)'
> echo ' install - Install kernel using (your) ~/bin/$(INSTALLKERNEL) or'

This does not remove the code that actually creates these old symlinks:

$ ll arch/x86_64/boot/bzImage
lrwxrwxrwx. 1 bgerst bgerst 22 Jun 13 13:06 arch/x86_64/boot/bzImage
-> ../../x86/boot/bzImage


Brian Gerst