From: David Laight <david.laight.linux@gmail.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [PATCH] x86/build: Do not allow X86_NATIVE_CPU to be enabled on non-x86_64 hosts
Date: Mon, 16 Nov 2026 22:28:39 +0000 [thread overview]
Message-ID: <20261116222839.4b4a04f2@pumpkin> (raw)
In-Reply-To: <20261116191120.GC1036192@ax162>
On Mon, 16 Nov 2026 12:11:20 -0700
Nathan Chancellor <nathan@kernel.org> wrote:
> 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@alien8.de> 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).
It would certainly also be nice to put something in the .config file
(or at least in the obj directory) that selects the correct compiler
for the kernel being built.
Otherwise it is easy to forget to request a cross compiler (etc).
(Maybe there is - but I've not found it.)
David
>
> > 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.
>
prev parent reply other threads:[~2026-11-16 22:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 0:31 Nathan Chancellor
2026-11-14 20:25 ` Borislav Petkov
2026-11-14 20:46 ` Nathan Chancellor
2026-11-14 20:58 ` Borislav Petkov
2026-11-15 5:07 ` Nathan Chancellor
2026-11-15 15:52 ` Borislav Petkov
2026-11-16 18:28 ` Nick Desaulniers
2026-11-16 19:11 ` Nathan Chancellor
2026-11-16 22:28 ` David Laight [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116222839.4b4a04f2@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=stable@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®