WIP: PoC for linux built with LTO to reduce its size#730
WIP: PoC for linux built with LTO to reduce its size#730tlaurion wants to merge 9 commits intolinuxboot:masterfrom
Conversation
|
Side notes which went nowhere, for traceability: richfelker/musl-cross-make@d2f59c9 |
|
What is the main problem here? Getting the toolchain to support the LTO? I have spinned up the build on your branch and it fails at: At first I have tried to simply build (outside of the heads build system) the kernel with/without LTO to see the potential gain. For the GCC LTO I have used: https://github.com/andikleen/linux-misc/tree/lto-420-1 The results show some (~7%) gain: I have also noticed quite recent approach with CLANG LTO: https://www.phoronix.com/scan.php?page=news_item&px=Linux-Kernel-Clang-LTO-Patches In this case I have used kernel from https://github.com/samitolvanen/linux/tree/clang-lto |
|
Only early experiments on this PR,I was not able to get the toolchain to support LTO. If the final binary is not getting cleaned post link phase, this means LTO is not enforced properly, as referred per referred articles. If we get kernel size downsized, we might want to bring that to other large libraries and binaries of heads, where I have no idea how we should call the cleanup so it is only applied if no other modules uses it. |
This is a followup attempt to #590
Any help welcome
Still no joy.
Scattered documentation followed, from most informative to less