Asm-goto Support Added To LLVM, Helping Out Clang'ing Kernel Efforts
Written by Michael Larabel in LLVM on 11 February 2019 at 08:18 PM EST. 7 Comments
LLVM --
LLVM has merged its support finally for supporting "asm goto" with this inline Assembly support needed for building the Linux x86/x86_64 kernel.

The LLVM asm-goto support was merged over the weekend while patches are pending against Clang to add the necessary bits to the C/C++ compiler front-end.

This satisfies a eight year old bug / feature request for handling "asm goto" by LLVM. This addition is notable since it's now one less barrier for being able to build the mainline Linux kernel off a vanilla LLVM/Clang compiler on x86_64 as an alternative to GCC. Unfortunately, some items still need to be addressed in reaching this mainline support goal.

The formal LLVMLinux effort that had been active in prior years for getting the mainline Linux kernel and Clang building support squared away has stalled, but fortunately others are involved in seeing this support through. In particular, Google has been particularly active recently with their engineers working on Clang'ing the kernel.

There's been interest in years for being able to compile the Linux kernel with LLVM/Clang in order to benefit from LLVM's often faster build times, the various sanitizers and other tooling that's built up around LLVM, compiler portability helps with code testing / portability, some vendors preferring LLVM/Clang due to its more liberal license over GCC, and other technical advantages in having more than one compiler that can tackle the code-base. Hopefully in 2019 we can finally see this goal fully realized for Linux x86_64 and AArch64.
Related News
About The Author
Author picture

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 or contacted via MichaelLarabel.com.

Popular News This Week