Re: [PATCH] x86/build/64: Prevent native builds from generating APX instructions
From: Chang S. Bae
Date: Thu Aug 27 2026 - 11:40:35 EST
On 7/12/2026 1:25 PM, Nathan Chancellor wrote:
Miguel's comment aside:
Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
Thanks!
As the flag is the same between the two compilers, I think it would beYeah, thanks -- I took this for V2.
more readable to do something like:
# Do not generate APX instructions as in-kernel use isn't ready
# Supported by GCC 14+ and LLVM 18+
KBUILD_CFLAGS += $(call cc-option,-mno-apxf)
BTW now I realized that both compilers already support `apx-features=` to specify sub-options. Instead of -mno-apxf entirely, -mno-apx-features="egpr" can just disable the use of EGPRs.
Thanks,
Chang