New Linux Patch Establishes "CONFIG_X86_64_NATIVE" For -march=native Kernel Builds

Written by Michael Larabel in Linux Kernel on 10 December 2024 at 11:00 AM EST. 10 Comments
LINUX KERNEL
Last week I wrote about Linux patches cleaning up x86 32-bit kernel builds for x86_64 CPUs. The new iteration of those patches were sent out today, including the addition of a patch adding the CONFIG_X86_64_NATIVE Kconfig tunable for enabling "-march=native" kernel builds to cater your optimized kernel compilation for the CPU on which you are building the kernel.

The patch adding the CONFIG_X86_64_NATIVE option came after Linus Torvalds came out against "completely broken" x86_64 micro-architecture feature levels. He's against adding Linux kernel build options to cater the compilation to different feature level targets, but he isn't against the notion of a "-march=native" kernel build to optimize for your own local CPU -- should you be into that, even if the performance benefits for the kernel build aren't always worthwhile.

Arnd Bergmann sent out the v2 patches of the x86 32-bit cleanups as the second iteration of the work sent out last week. In addition to adding the "-march=native" kernel build option, the v2 patches keep the 32-bit KVM host support around for now. Last week's patches raised the idea of eliminating x86 32-bit KVM host virtualization support but that idea didn't garner enough interest to fly for now.

The v2 patches also drop the patch for 64-bit Silverlake support, remove the rejected x86_64 ISA feature level selection, and also reorganize the platform selection code.

X86_64_NATIVE option


See the v2 patch series for those interested in this work and be on the lookout for the CONFIG_X86_64_NATIVE option if wanting to easily customize your kernel build for catering the compilation to the CPU you currently have in use.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week