Linux 5.18 To Try Again For x86/x86_64 "WERROR" Default

Written by Michael Larabel in Linux Kernel on 3 April 2022 at 07:46 AM EDT. 12 Comments
The Linux 5.18 merge window is ending today while sent in this morning were a batch of "x86/urgent" updates that include enabling the CONFIG_WERROR knob by default for Linux x86/x86_64 default configuration "defconfig" kernel builds.

Last year with Linux 5.15 the kernel tried enabling -Werror by default for treating all compiler warnings as errors. The motivation was to ensure compiler warnings are treated serious by developers and for new code not to introduce any new warnings. That change caused lots of build-time pains for the Linux kernel and thus scaled it back.

Now with Linux 5.18 with today's pull request, CONFIG_WERROR would be enabled by default for x86/x86_64 defconfig builds for re-enabling that "-Werror" behavior.

A last batch of x86 updates sent in ahead of the Linux 5.18 merge window closure.

This should make Linus Torvalds happy given his earlier comment on the matter:
"EVERYBODY should have CONFIG_WERROR=y on at least x86-64 and other serious architectures, unless you have some completely random experimental (and broken) compiler.

New compiler warnings are not acceptable."

This pull request has that defconfig enabling for x86/x86_64 along with a change around the dynamic XSTATE enabling via prctl(), handling supervisor states correctly in the FPU/XSTATE code, and other fixes / last minute work.
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