Package: debhelper,lintian
Severity: important
Some packages build with link time optimizations enabled, which is ok,
whoever then these packages may ship with static libs which still have
the LTO information in some sections of the object files (e.g.
ext2fsprogs). This is not desired in most cases, so this information
should be removed from these files, and not shipped in the archive. Plus
the streaming format for the LTO information changes (even in GCC minor
releases), and leads to build errors when you try to use an old
streaming format with a newer compiler. I'm asking for
- dh_strip removing sections, as in
strip -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_slim -N
__gnu_lto_v1
which is turned on by default.
- dh_strip providing an option not to remove these sections.
- lintian warning about object files and static archives having such
sections.
I'd like to see that implemented in debhelper, because LTO builds are
also sometimes enabled in upstream sources.
LTO is turned on by default in Suse, and their dh_strip equivalent
provides the functionality above for the removal of the LTO information.
Please feel free to split this issue into separate debhelper and lintian
tasks once a solution is agree upon.