[Interest] building Qt 4.8.7 with gcc 5 and link-time optimisation on Linux

René J. V. Bertin rjvbertin at gmail.com
Wed Jul 22 21:57:57 CEST 2015


Thiago Macieira wrote:


> No need to look further. Neither QtScript nor QtWebKit will link with LTO.
> Turn it off for those two.

Ahhh ...

> Also, for QtGui (in both Qt 4 and 5), you need to be careful with the code for
> SSE2 and SSSE3. Until I applied certain fixes to Qt 5, those would cause the
> *entire* *build* to suddenly require SSSE3. Or fail to compile, depending on
> the order of the files.

I haven't checked, but since I'm also using a -march=X option in my PPAs that 
presumes the presence of SSSE3 anyway I should be fine here.

> Add to script.pro:
> QMAKE_CXXFLAGS -= -flto

Ok, testing that now (with a matching incantation for LDFLAGS).

> qtbase:
> ./configure [...]
> qmake -config ltcg

When was that syntax introduced? I'm getting an error trying it even with qmake 
5.4.2 .

> Does it work? Yes, my GCC release build of Qt has been done with LTCG for two
> years.

And is there a noticeable effect (apart from a measurable one)?

Thanks,
R.




More information about the Interest mailing list