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

René J. V. Bertin rjvbertin at gmail.com
Fri Jul 24 10:30:09 CEST 2015


Thiago Macieira wrote:


>> If this were a local build I'd just skip the LTO for QtScript, but the build
>> is to be handled by a LauncPad PPA ....
> 
> Add to script.pro:
> QMAKE_CXXFLAGS -= -flto

This is enough for QtScript (with a similar QMAKE_LFLAGS statement).
However, for QtWebkit it is not, an additional

QMAKE_LFLAGS += -fno-lto

appears to be required, otherwise the final link fails. I'm guessing that means  
that the linker pulls in an object from outside of the Webkit tree which causes 
it to switch to LTO mode (as far as I've seen the Webkit source is compiled 
without -flto itself).

R.




More information about the Interest mailing list