Linux 6.9 To Allow RISC-V Kernel Builds With Clang Link-Time Optimizations
Adding to the list of features slated for the upcoming Linux 6.9 cycle is allowing RISC-V kernel builds to be compiled with Clang Link-Time Optimizations (LTO) enabled.
For being able to enhance the resulting binary's performance and size/layout, LTO support will now be available when compiling the RISC-V kernel with LLVM Clang 14.0 or newer, or in particular the LLD 14+ linker.
This patch in RISC-V's "for-next" Git branch prepares the LTO support for the RISC-V kernel build. Both the traditional LTO functionality as well as Clang's ThinLTO mode for a more scalable and incremental approach is supported. The Linux 6.9 merge window is set to open in March while the stable kernel will be out around the middle of the year.
It's been since 2021 with Linux 5.12 when Clang LTO for the Linux kernel was originally added on x86_64.
For being able to enhance the resulting binary's performance and size/layout, LTO support will now be available when compiling the RISC-V kernel with LLVM Clang 14.0 or newer, or in particular the LLD 14+ linker.
This patch in RISC-V's "for-next" Git branch prepares the LTO support for the RISC-V kernel build. Both the traditional LTO functionality as well as Clang's ThinLTO mode for a more scalable and incremental approach is supported. The Linux 6.9 merge window is set to open in March while the stable kernel will be out around the middle of the year.
It's been since 2021 with Linux 5.12 when Clang LTO for the Linux kernel was originally added on x86_64.
2 Comments