-
-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: PoC for linux built with LTO to reduce its size #730
base: master
Are you sure you want to change the base?
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