[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 21:17:24 CEST 2015


Thiago Macieira wrote:


> For Clang, QT_COMPILER_SUPPORTS_HERE(x) expands to a check defined(__x__) [in
> this case, if __SSE4_2__ is defined].

I had a hunch it'd be that, but must have missed the actual macro definition 
where this would have become evident (I was working remotely, so only used vi to 
browse the code).
> 
> Ah, that is actually the issue.

I'm actually a bit surprised that either the compiler finds nothing in the Qt 
code to auto-vectorise with SSE4 instructions, or that that doesn't lead to 
issues in the linker with LTO.
> 
> You're on OS X. All 64-bit Mac hardware supports SSE 4.2, so that feature is
> always enabled when compiling 64-bit code. The -no-sse4.2 option has no effect
> on 64-bit, the same way that the -no-ssse3 option has no effect in 32-bit
> code.

I find that a bit curious. Why disallow the user to deactivate support for SSEx 
(and why not even printing a message drawing attention to the fact)?
Fortunately your claim isn't true to the extent that the feature is enabled also 
when SSE4 support is not enabled at the level of the compiler.

Also, note that code that has to run on VMs may need to deactivate SSE4 support. 
There is at least 1 virtualisation solution that does not expose the instruction 
set.

R.




More information about the Interest mailing list