Fedora 33 Proposal To Allow Packages To Build With LLVM Clang Rather Than Requiring GCC

Written by Michael Larabel in Fedora on 4 June 2020 at 06:35 PM EDT. 31 Comments
FEDORA
A feature proposal raised by Red Hat's Jeff Law would allow Fedora packages to be built under the LLVM Clang compiler rather than defaulting that all packages to be built under GCC. Clang-built packages would happen where the upstream software recommends using Clang by default or for software without an upstream to let the packager(s) make their own decision.

One of the most prominent examples that would benefit from this compiler policy change would be letting their Mozilla Firefox package be built with Clang rather than GCC. Upstream Firefox is built by Clang and that is what Mozilla recommends as their compiler of choice, but Fedora has been building with GCC. Using GCC to build Firefox can at times lead to build problems given Mozilla's Clang focus and reportedly also in some instances less than ideal performance. There are also other examples like for many Google open-source projects that are tailored towards being compiled under Clang.

So with this compiler policy change, Clang could be used for building the Fedora RPMs where the upstream software vendor/developer(s) recommend so or for software without any other upstream to let the packager decide. For software packages without a strong compiler preference, for the time being at least GCC would be the default choice. Currently the Fedora policy only allows Clang to build packages in cases where only Clang is supported to build the software being packaged.

At least initially the expectation is this policy change will only impact a few albeit important packages like Firefox and Chromium but will be interesting to see how it evolves over time. Of course, the Fedora Engineering and Steering Committee (FESCo) still needs to sign off on this change.
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