Closed sunnyflunk closed 7 years ago
zlib
before ypkg changes:
552K install/usr/lib64/libz.a
And after changes...
552K libz.a
..lol. Strip doesn't work on the LTO objects.
OK so with LTO - prior to changes:
552K install/usr/lib64/libz.a
120K install/usr/lib64/libz.so.1.2.11
Without LTO - post changes:
124K install/usr/lib64/libz.a
96K install/usr/lib64/libz.so.1.2.11
TL;DR Our stripping is broken in general for LTO - and missed completely for .a
OK so LTO is super cranky. To alleviate this I'm switching us to binutils 2.27, enabling ld.gold
, making bfd
the default, and providing the bfd liblto_plugin
link in GCC..
binutils
change in Solus https://git.solus-project.com/packages/binutils/commit/?h=binutils-2.27-22
Enabling LTO plugin + gold in GCC: https://git.solus-project.com/packages/gcc/commit/?h=gcc-6.3.0-22
Solved
Final results:
Hostside:
556K /usr/lib64/libz.a
New build of zlib:
168K install/usr/lib64/libz.a
As discussed, examine.py doesn't understand the .a 'current ar archive' format to strip them and the few .a files that are included in Solus are waaaay larger than they need to be.