Bug 1103185

Summary: Qt 5.3.0 defaults to sse2 x86 support
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: qt5-qtbaseAssignee: Rex Dieter <rdieter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jgrulich, jreznik, kevin, ltinkl, rdieter, rnovacek, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-10 17:17:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rex Dieter 2014-05-30 12:41:37 UTC
Per
http://lists.qt-project.org/pipermail/development/2013-November/014085.html

"Enabling SSE2 by default on x86 builds (32-bit)"

Starting with Qt 5.3.0, x86 builds use SSE2 by default.  Extra care needs to be taken so fedora's default i686 packaging includes libraries built with --no-sse2

NOTE:  qt5-qtdeclarative had already included some minor hacks to support both see2-enabled and non-sse2 libraries.  It will likely need to be reworked.

Comment 1 Rex Dieter 2014-05-30 15:23:05 UTC
%changelog
* Fri May 30 2014 Rex Dieter <rdieter> 5.3.0-6
- %%ix86: build -no-sse2 (#1103185)


Here's the diff in the resulting qmodule.pri

$ diff -u /usr/lib/qt5/mkspecs/qmodule.pri qmodule.pri
--- /usr/lib/qt5/mkspecs/qmodule.pri    2014-05-22 08:57:41.000000000 -0500
+++ qmodule.pri 2014-05-30 09:26:28.296848196 -0500
@@ -1,4 +1,4 @@
-CONFIG +=  compile_examples system-sqlite qpa largefile nostrip sse2 sse3 ssse3 sse4_1 sse4_2 avx avx2
+CONFIG +=  compile_examples system-sqlite qpa largefile nostrip
 QT_BUILD_PARTS += libs tools examples
 QT_NO_DEFINES =  IMAGEFORMAT_JPEG OPENVG TABLET XINPUT XKB ZLIB
 QT_QCONFIG_PATH = 


Next step(s):
* consider building (some?) sse2-enabled libs too, install these to %{_libdir}/sse2/.  Good candidates include: libQt5Core, libQt5Gui
* verify how to do sse2-enabled builds for other qt5 pkgs.  Something like "qmake-qt5 CONFIG+=sse2" ?  
* what about the other CONFIG items sse3 ssse3 sse4_1 sse4_2 avx avx2 ?

Comment 2 Rex Dieter 2014-05-30 18:17:51 UTC
I've confirmed the current qt5-qtdeclarative sse2 solution still works

As far as qtbase is concerned, only libQt5Gui uses some sse2-optimized routines.  Building a sse2-enabled version of that could be considered for the future.

Comment 3 Than Ngo 2014-06-23 15:32:01 UTC
rex, i'm not sure if it's worth doing support old cpu these days. 
In my opinion we just drop it and only build qt with sse2 by default.

Comment 4 Rex Dieter 2014-06-23 15:49:27 UTC
Then we need to get the project arch support policy changed (if not obvious, I disagree with enabling sse2 by default, if it's not supported distro-wide).

Comment 5 Than Ngo 2014-06-23 15:58:45 UTC
we will discuss it by next kde sig meeting. I would like to hear more comments from others how we handle this issue.

Comment 6 Rex Dieter 2014-06-23 16:07:47 UTC
Fwiw, I'm still willing to help work on a special sse2-enabled libQt5Gui, as hinted in comment #2

Comment 7 Rex Dieter 2014-07-10 17:17:21 UTC
I think the consensus from the meeting was to keep things as they are (with potential enhancements per comment #2), so I'll close this for now.