Linux Developers Look At Upping The GCC Requirements For Building The Kernel

Written by Michael Larabel in Linux Kernel on 16 December 2016 at 07:24 AM EST. 28 Comments
Kernel developer Arnd Bergmann has started a discussion over upping the minimum GCC version that's supported for building the Linux kernel. He's been testing every GCC compiler release from 4.0 through GCC 7 to see the results when building the Linux kernel.

Bermann's findings include:

- GCC 4.9 and newer is basically "warning-free everywhere", or in other words really good shape for building the kernel. GCC 4.8 should be in mostly good shape too.

- Using GCC 4.6/4.7 don't lead to build failures but does have a larger number of false-positive warnings with the kernel code.

- GCC 7 does introduce some new warnings, to which he is working on patches for the Linux kernel to take care of those spotted items.

- GCC 4.5 and older is where things get a bit more hairy with the dead code elimination not being as good. Arnd would like to support just GCC 4.6 and newer, but he acknowledges some are still on these older compilers. Red Hat Enterprise Linux 6, Debian 6, and Ubuntu 10.04 are among the distributions using GCC 4.4. SUSE Linux Enterprise Server 11 meanwhile is on GCC 4.3.

- Using GCC 4.3 to build the modern kernel does require some workaround patches for taking care of some problems. There are also a significant number of false-positive warnings with this old compiler release and some Kconfig options need to be disabled for building GCC 4.3.

- When testing on ARM, pre-4.3 support is in very rough shape.

Arnd Bergmann has published a set of 13 patches needed to make the Linux kernel workaround issues for releases prior to GCC 4.6. The discussion is only beginning now via this kernel mailing list thread with hoping kernel developers decide to adopt a minimum supported version of GCC 4.3 or 4.6.
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