LLVM Clang Should Be Able To Build Linux 5.9 x86 32-bit Kernels

Written by Michael Larabel in Linux Kernel on 22 July 2020 at 12:13 AM EDT. 2 Comments
LINUX KERNEL
With LLVM Clang 9 and Linux 5.3 the mainline kernel can be built following a years-long effort to be able to build the mainline Linux x86_64 kernel with Clang rather than GCC, which followed the AArch64 efforts in a similar achievement. Now with Linux 5.9 coming later this year, the i386 / 32-bit x86 mainline kernel will also now be capable of building under Clang.

While most distribution vendors are phasing out 32-bit support except for the likes of select libraries needed by the likes of Steam or different printer software and other isolated use-cases running in an x86_64 environment, with the Linux 5.9 cycle it's set to be the first where mainline LLVM Clang can build the mainline Linux kernel for 32-bit x86 targets.

Patches have been around for a while but now following multiple rounds of review, the code is queued for making it into Linux 5.9 for providing i386 Clang support.

Another achievement for Clang'ing the kernel that may help those still concerned about x86 32-bit support and wanting to use a single compiler for building all supported architectures. Using Clang to build the Linux kernel can provide better diagnostics, ensure better code portability in being able to build under multiple compilers (i.e. eliminating GCC'isms), depending upon the configuration can yield better compile times, and similar benefits.
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