[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Link-Time Optimisation

Hi all,

has anyone ever wondered about adoption of LTO in Debian?

I’ve been using -fwhole-program --combine since GCC supported
it somewhat reliably (with a fallback as they have broken it
regularily at least three times) in mksh, and now several of
my packages try -flto=jobserver with a fallback. (This does
not break clang, but it doesn’t take profit of clang’s possible
whole-programme optimisations either. But since clang was not
yet a viable compiler for Debian official packages, I have not
invested into it yet – mksh upstream can utilise it.)

But who else is doing that?

Good examples for how to do this are src:kwalletcli and src:pax
since recently. They also use dpkg-buildflags only if available.
(Of course, if someone knows of improvements once seeing their
rules files, which do NOT involve cdbs or dh7, do tell.)

Due to the fallbacks, backports to Debian releases with gcc 4.4
or older work, and failures to LTO or combine do not abort the

One drawback is #650145 which even occurs with -Wl,--as-needed,
but that’s really cosmetic in virtually all cases. Somewhat
longer build times and memory consumption too (which gcc-4.6
LTO reduces again though), but hey, even m68k can do it…

Please Cc me on replies. Thanks.

Solange man keine schmutzigen Tricks macht, und ich meine *wirklich*
schmutzige Tricks, wie bei einer doppelt verketteten Liste beide
Pointer XORen und in nur einem Word speichern, funktioniert Boehm ganz
hervorragend.		-- Andreas Bogk über boehm-gc in d.a.s.r

Reply to: