Control: tag -1 - patch + moreinfo Control: retitle -1 dpkg-buildflags: Add support for an optimize area for things like LTO
On Tue, 2019-09-17 at 14:36:44 +0200, Matthias Klose wrote: > Package: src:dpkg > Version: 1.19.7 > Tags: patch > Please add an optimization area (opt, optimization) for extra optimizations > like lto (link time optimization) and pgo (profile guided optimization). > lto can be directly translated into compiler flags, as seen in the attached > patch, assuming that no lto across package boundaries is done (ensured by > the debhelper patch in #939656). The patch assumes that just nolto can be > used to disable lto until an area is introduced in dpkg. > > Some upstream packages also provide build support for lto builds, so for > these an option should be given to disable the addition to the compiler > flags (like the nolto in the proposed patch). I take you are requesting both adding this and also enabling LTO by default? I'm fine with the former (even implementing that myself), but the latter would need to go through [Q] first. And I see this can cause breakage [O] according to the OpenSUSE people. [Q] <https://wiki.debian.org/Teams/Dpkg/FAQ#Q:_Can_we_add_support_for_new_default_build_flags_to_dpkg-buildflags.3F> [O] <https://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-inter-procedural.html> > pgo doesn't directly translate into compiler flags, but almost always > requires upstream support in the build system. pgo usually is enabled by > some configure options which are specific to the upstream build. pgo > usually requires running a profiling task, so this optimization probably > should be disabled for cross builds, otoh, the cross build then is different > to the native build (although it should create a functional identical > package). I don't see how dpkg can support PGO, so I'm excluding that from this request, as it seems this would be pretty much unactionable. Regards, Guillem