There's Interest In Building The Linux Kernel With Clang

Written by Michael Larabel in Software on 5 April 2012 at 02:51 PM EDT. Page 2 of 3. 9 Comments.

The Clang static code analyzer has been cited by many projects as being able to uncover countless issues. Just last week was when Ryan Gordon recommended Clang as part of the Linux game development tool-stack for its unique abilities. Qualcomm also cited Google as using Clang internally on their development builds of their software for uncovering potential items and other issues not handled by GCC. However, for now at least, release builds of Google software is still being done by the GNU Compiler Collection.

Some other LLVM/Clang examples brought up during this 50-minute presentation was Minix now using Clang as their default compiler, FreeBSD building more software with LLVM/Clang instead of GCC, LLVM is used within Google's Android as a JIT compiler for RenderScript, and LLVM's growing use within Mesa's Gallium3D. Phoronix readers know all about LLVM and Gallium3D already with the LLVMpipe driver, the OpenCL "Clover" state tracker, shader optimizations, the GPU LLVM back-ends like for R600g, etc. Another cited example was Clang building most of the Debian x86/amd64 packages.

With ARM software often being cross-compiled by GCC, doing so with LLVM/Clang was brought up and that's where ELLCC was mentioned. ELLCC is in-development "to create an easy to use multi-target cross compilation environment for embedded systems." Among the target support for this LLVM-based project that's not yet production ready are ARM, i386, x86_64, Microblaxe, MIPS, Nios2, PowerPC, PowerPC64, and SPARC.

Also posing challenges for now with Clang cross-compiling is a current dependence on the GNU cross toolchain for assembly and linking.


Related Articles