LLVM/Clang Can Work Fine As A GCC Replacement For Linux Distributions

Written by Michael Larabel in LLVM on 5 February 2024 at 06:57 AM EST. 43 Comments
LLVM
While the performance of LLVM/Clang is on-par with GCC these days on both x86_64 and AArch64 and the C/C++ support is very robust compared to many years ago, most Linux distributions continue using the GCC compiler and GNU toolchain by default. OpenMandriva is a well known Linux distribution that for several years has been a Clang-built Linux distribution while for three years now the Chimera Linux distribution has also been relying exclusively on an LLVM toolchain.

Daniel Kolesa with the Chimera Linux project presented at FOSDEM 2024 yesterday on building a Linux distribution using LLVM. Chimera Linux has been using exclusively an LLVM-based toolchain -- the Clang C/C++ compiler as well as compiler-rt and libc++ and other LLVM sub-projects.

Why use LLVM


Chimera Linux has been successfully using this LLVM toolchain for targeting five CPU architectures and LLVM has proven itself capable of taking on the job. While it's not been without obstacles, the effort has proven that LLVM can be successfully used as a toolchain for building Linux distributions.

Why use LLVM


Chimera Linux has found the link-time optimization (LTO) support to be better, security hardening features of the compiler to be in great shape, and that toolchain patching is inline with GCC.

Chimera Linux with LLVM conclusion


Those wanting to learn more about Daniel Kolesa's experiences in using the LLVM toolchain for compiling a complete Linux distribution can find his FOSDEM 2024 presentation assets via FOSDEM.org. Those wanting to learn about the Chimera Linux non-GNU Linux distribution itself can do so at Chimera-Linux.org.
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