Linux 5.1 Will Play Nicer With The LLVM Linker (LD.LLD)
Written by Michael Larabel in Linux Kernel on 9 March 2019 at 06:41 AM EST. 4 Comments
LINUX KERNEL --
The Kbuild updates for the in-development Linux 5.1 kernel have a few worthwhile improvements including the ability to pass optional flags to dpkg-buildpackage when spinning up a Debian kernel package, some minor optimizations, and preparations around LD.LLD support in using the LLVM linker to link the Linux kernel.

Nick Desaulniers of Google, one of the engineers there who has been part of the renewed effort to build the Linux kernel with LLVM's Clang compiler, upstreamed a new patch to fix an issue that held back using the LLVM linker in some configurations.

In particular, when trying to specify ld.lld as the linker to use when building the kernel, if ld.lld isn't in the same directory as the rest of the compiler toolchain to be used, the kernel's build scripts would have issue in figuring out the GCC toolchain directory. That's now been cleared up to help those trying to use the LLVM linker with the Linux kernel.

Besides Google's interest in using Clang to build the Linux kernel, they've also been interested in the LLVM linker (and in fact divesting from GNU's Gold linker) due to the greater performance and LLD still being a drop-in replacement to the GNU linkers.

Those unfamiliar with LLD and wanting to learn more about it can do so at lld.llvm.org. All of the Kbuild updates for this kernel cycle are outlined in this pull request.

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 10,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.

Related Linux Kernel News
Popular News This Week