Re: [PATCH 04/15] x86/kbuild: Introduce the 'x86_32' subarchitecture

From: Arnd Bergmann
Date: Fri May 09 2025 - 14:06:54 EST


On Wed, May 7, 2025, at 08:35, Ingo Molnar wrote:
> * Arnd Bergmann <arnd@xxxxxxxx> wrote:
>> On Tue, May 6, 2025, at 19:09, Ingo Molnar wrote:


>> Also, I don't think there are any systems that return 'x86_32' from
>> 'uname -m', so your added special case would never be used by
>> default, only when cross-compiling from some other architecture.
>
> No, on most 32-bit systems 'uname -m' returns 'i686', which we cannot
> use straight away anyway. And it looked a bit silly to me for us to
> fudge over the architecture from 'i686' to 'i386', when we haven't
> supported i386 for quite some while and are now working on i486
> removal...
>
> Let's just have x86_32 as the internal primary subarchitecture name,
> with support for historic aliases like 'i386'. That it cleans up things
> for defconfig naming is a bonus.

If we're going to remove the ARCH=i386 stuff anyway, I wouldn't add
x86_32 now, what I suggested was to remove both i386 and x86_64 as
identifiers here and just keep ARCH=x86 internally. It's only used
in two places anyway: the 'make defconfig' and the CONFIG_64BIT
selection.

The SUBARCH= logic is independent of that, this bit is only used
for arch/um/, though that would have to change the same way as
arch/x86

Arnd