Re: [PATCH] x86/build: Do not allow X86_NATIVE_CPU to be enabled on non-x86_64 hosts

From: Nathan Chancellor

Date: Mon Nov 16 2026 - 14:13:03 EST


On Mon, Nov 16, 2026 at 10:28:54AM -0800, Nick Desaulniers wrote:
> On Sat, Nov 14, 2026 at 12:58 PM Borislav Petkov <bp@xxxxxxxxx> wrote:
> >
> > (If it were me, I'd simply whack that native thing. It is such a waste of
> > energy).
>
> There's always KCFLAGS. i.e. we _could_ remove it from the x86 build,
> and <whoever cares> could still do
>
> $ make KCFLAGS="-march=native" ...
>
> (I'm agreeing with Boris here)

I have no objections to deleting X86_NATIVE_CPU but as Ingo notes in the
v2, people do use this and it is much more convenient for a regular user
to adjust this single configuration option in their local configuration
file than fiddling with KCFLAGS (potentially having to modify their
distribution's packaging file in the process).

> Nathan,
> Was there a bug on file against clang for this? I can picture a fix
> in my head for this...

I am not sure I ever found one. I can file one later today.

--
Cheers,
Nathan