Re: [tip: x86/urgent] x86/build: Do not allow X86_NATIVE_CPU to be enabled when compile testing

From: David Laight

Date: Wed Nov 18 2026 - 04:00:48 EST


On Wed, 18 Nov 2026 00:28:48 -0700
Nathan Chancellor <nathan@xxxxxxxxxx> wrote:

> On Mon, Nov 16, 2026 at 10:36:28PM +0000, David Laight wrote:
> > I don't even remember a check that the compiler is right for the architecture.
> > I'm sure I've got strange errors when I've forgotten I need to specify the
> > compiler for a cross build - and then forgotten where I'd put the compiler,
>
> Yeah, I guess having some internal check that the correct compiler is
> being used could be useful/user friendly but given how fast things
> explode otherwise, I am not sure it is worth the additional complexity.
>
> > Oh and forgotten all the things you need to set to get clang to do a
> > cross compile.
>
> $ make ARCH=... LLVM=1
>
> is generally all you need to do nowadays.
>

That requires that you also get the correct clang on $PATH.
I'm sure I remember that not being as easy as it might seem.

David