[mythtv] LTO with -O3 optimisations compile support in MythTV?

Gary Buhrmaster gary.buhrmaster at gmail.com
Wed Nov 10 16:49:29 UTC 2021


On Wed, Nov 10, 2021 at 1:32 PM Piotr Oniszczuk
<piotr.oniszczuk at gmail.com> wrote:

> Pls let me know if you are interested to include this into current MythTV master.

(optional) LTO support has been in master for around
a year now, and specifying it (and the various overrides
for gcc and/or clang versions to support lto properly
across the various compiler versions and implementations)
and -O3 is really a job for your specific configure flags,
and "just works for me" when I use them (I think
the github issue mentioned the required flags to the
configure step to let it all (optionally) work across the
various combinations).

Did you find you needed to make further changes
elsewhere in the code for such (optional) support,
or has no one ever submitted the (upstream) FFmpeg
bug report (and if this is the previously reported FFmpeg
bug, it really really needs to be reported upstream first
and accepted there before cherry picked into the
MythTV project).

FWIW, while I tend to compile my "production" with
clang and lto (which have generated the better
results and avoids certain issues I have) the
improvements are basically small in the tests
I have done on my systems.  And day to day
compilation is almost always much slower in
elapsed time with LTO (so I do not use lto for test
builds).  Do you have any available  performance
measurements that show much better runtime
performance in runtime for your use cases?

FWIW, I think the best reason to compile with LTO
(occasionally) is to identify the (past) occasional
use of the same function name in different
contexts (which has always been invalid in C++,
but the MythTV project had a few cases which
needed to be cleaned up, and, as I recall, were
fixed in the original github issue/pull).


More information about the mythtv-dev mailing list