Linux 5.0-ad1 Patch Lets You Build The Kernel With "-march=native"

Written by Michael Larabel in Linux Kernel on 5 March 2019 at 04:54 AM EST. 21 Comments
While the upstream Linux kernel developers may not be interested in adding all of the CPU compiler tuning optimizations carried by Gentoo for their kernel builds, if you are after just "-march=native" compiler tuning to optimize your kernel build for the CPU being used, an updated patch is now available.

Developer Alexey Dobriyan has published his "Linux 5.0-ad1" patch where the focus of his patch is on carrying Gentoo's "-march=native" kernel option for this newest Linux kernel release.

Alexey previously communicated that he is pursuing this work for possible performance gains but without any serious benchmarking being done. In our new testing of the kernel's CPU optimization patches based upon the work by Gentoo, in most scenarios unfortunately there is little to no change in performance for end-users if optimizing their kernel image for the CPU microarchitecture being used.

But at least with the "-march=native" approach, it's just a single kernel build option to cater your build towards your particular CPU in use. While convenient, the resulting kernel images aren't recommended for redistribution to other systems of different CPU micro-architectures.

The Linux 5.0-ad1 patch is available on the kernel mailing list.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week