[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 23:20:40 CEST 2015
Thiago Macieira wrote:
> $ git name-rev --tags 1bd27f24fb7f7d82f4b67cffe43e0af644709106
> 1bd27f24fb7f7d82f4b67cffe43e0af644709106 tags/v5.4.0-alpha1~525
>
> It should work on 5.4 then. The fix for static libraries came with 5.4.1,
> though.
Ha, indeed, it's a little bit more complicated when doing out-of-source builds.
With an explicit reference to the .pro file -config was accepted, but I'm not
yet sure that it actually changed anything when executed in a build directory on
my Mac that had already seen a full build. It looks like all code was being
recompiled, but I didn't see any flto options except in the 1st link command,
which probably explains why it told me
LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse42.crc32.64.64
(I'm using -march=native on an i7).
Is it possible to negate/cancel/revert the effect of qmake -config ltcg? :)
> Check if you have mkspecs/features/ltcg.prf.
That one actually exists in Qt 4.8.7 too ...
> It takes noticeably longer to compile :-)
And even longer to link? ;)
> the use of -ffunction-sections -Wl,--gc-sections. The libraries are bigger,
> but that might be due to my use of -O3 (causes code expansion).
I'd think so; my initial impression with Qt 4.8.7 is that the difference is
minimal.
More information about the Interest
mailing list