GCC Patches Added -mcpu=native -mtune=native Support For RISC-V

Written by Michael Larabel in GNU on 26 August 2026 at 06:08 AM EDT. Add A Comment
GNU
A SiFive engineer posted patches today for the GNU Compiler Collection (GCC) for adding -mtune=native -mcpu=native support for the compiler on RISC-V.

Kito Cheng of SiFive posted the patches for wiring up "-mcpu=native -mtune=native" RISC-V GCC support so it aligns with other architectures in supporting these options for tuning and catering the ISA to the CPU core in use for the local system. It's unfortunate it has taken so long for these "native" CPU/tuning options to come but at least now it's on approach and will hopefully be merged ahead of next year's GCC 17 compiler release.

SiFive HiFive Premier P550


This patch series contains the GCC RISC-V -mcpu=native and -mtune=native support. One caveat to the RISC-V support is that it doesn't yet have support for RISC-V hybrid / asymmetric CPU core designs. The patches also improve GCC's identification for the SiFive P550 / P870-D / U74 and Spacemit X60 / X100 / A100 cores.
Related News
About The Author

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