Developers Still Pursue Linux Kernel With LLVM/Clang
Open-source developers are still pursuing the feat of building the mainline Linux kernel with the LLVM/Clang compiler rather than GCC.
There's been much interest in building the Linux kernel with Clang rather than the GNU Compiler Collection, for a variety of reasons as covered in many past Phoronix articles. In 2010 the milestone was reached of building the kernel with LLVM's C/C++ compiler, but not the entire kernel was built at that time, there were many out-of-tree Linux kernel patches, out-of-tree LLVM/Clang patches, and not everything was working right.
While there's many parties going after the milestone of building the Linux kernel with a non-GCC compiler, there's still some work left. The last update covered on Phoronix with Clang'ing the Linux kernel was back in November.
Efforts surrounding this for x86 and ARM kernels continue to be via the Linux Foundation's LLVM Linux area. The latest work in this area will be covered in a talk this weekend at FOSDEM.
The Linux kernel can still be built with LLVM/Clang for x86 and ARMv7, but all the patches haven't been mainlined and there's still other work outstanding. There's LLVM patches to be upstreamed that are considered a "high priority" along with patches for the Clang compiler front-end, difference in behavior to be worked out between Clang and GCC for unsupported flags, improvements to the Clang Static Analyzer for the Linux kernel, proper 64-bit type handling support in ARM, making the Kbuild scripts in the kernel not GCC-dependent, upstreaming some kernel patches, and various other work.
A lot of this LLVM Linux work is being done by Qualcomm's Innovation Center where they have a strong interest in building the Linux kernel with Clang, as extensively covered here, so the ARM kernel support is generally in better shape than the x86 world for building with the Apple-sponsored compiler.
Expect more information once FOSDEM has concluded, but until then stop by llvm.linuxfoundation.org.
There's been much interest in building the Linux kernel with Clang rather than the GNU Compiler Collection, for a variety of reasons as covered in many past Phoronix articles. In 2010 the milestone was reached of building the kernel with LLVM's C/C++ compiler, but not the entire kernel was built at that time, there were many out-of-tree Linux kernel patches, out-of-tree LLVM/Clang patches, and not everything was working right.
While there's many parties going after the milestone of building the Linux kernel with a non-GCC compiler, there's still some work left. The last update covered on Phoronix with Clang'ing the Linux kernel was back in November.
Efforts surrounding this for x86 and ARM kernels continue to be via the Linux Foundation's LLVM Linux area. The latest work in this area will be covered in a talk this weekend at FOSDEM.
The Linux kernel can still be built with LLVM/Clang for x86 and ARMv7, but all the patches haven't been mainlined and there's still other work outstanding. There's LLVM patches to be upstreamed that are considered a "high priority" along with patches for the Clang compiler front-end, difference in behavior to be worked out between Clang and GCC for unsupported flags, improvements to the Clang Static Analyzer for the Linux kernel, proper 64-bit type handling support in ARM, making the Kbuild scripts in the kernel not GCC-dependent, upstreaming some kernel patches, and various other work.
A lot of this LLVM Linux work is being done by Qualcomm's Innovation Center where they have a strong interest in building the Linux kernel with Clang, as extensively covered here, so the ARM kernel support is generally in better shape than the x86 world for building with the Apple-sponsored compiler.
Expect more information once FOSDEM has concluded, but until then stop by llvm.linuxfoundation.org.
8 Comments