libqt5-qtdeclarative/sse2_nojit.patch

46 lines
1.9 KiB
Diff

From: Fabian Vogt <fabian@ritter-vogt.de>
Subject: Allow building with and without JIT on i586
For i586, the default Qt does not have sse2 enabled, but for sse2 capable systems
we'd like to have it use the JIT. Do some patching in the configuration system
to allow toggling it from the qmake call.
Originally written by Wolfgang Bauer <wbauer@tmo.at>
Index: qtdeclarative-everywhere-src-5.14.0-alpha/src/qml/jsruntime/jsruntime.pri
===================================================================
--- qtdeclarative-everywhere-src-5.14.0-alpha.orig/src/qml/jsruntime/jsruntime.pri
+++ qtdeclarative-everywhere-src-5.14.0-alpha/src/qml/jsruntime/jsruntime.pri
@@ -164,6 +164,10 @@ win32 {
$$PWD/qv4functiontable_unix.cpp
}
+linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 {
+ QMAKE_CFLAGS += -msse2 -mfpmath=sse
+ QMAKE_CXXFLAGS += -msse2 -mfpmath=sse
+}
valgrind {
DEFINES += V4_USE_VALGRIND
Index: qtdeclarative-everywhere-src-5.14.0-alpha/src/qml/configure.json
===================================================================
--- qtdeclarative-everywhere-src-5.14.0-alpha.orig/src/qml/configure.json
+++ qtdeclarative-everywhere-src-5.14.0-alpha/src/qml/configure.json
@@ -8,6 +8,7 @@
"commandline": {
"options": {
"qml-network": "boolean",
+ "qml-jit": "boolean",
"qml-debug": "boolean"
}
},
@@ -90,7 +91,7 @@
"purpose": "Provides a JIT for QML and JavaScript",
"section": "QML",
"condition": [
- " (arch.i386 && tests.pointer_32bit && features.sse2)
+ " (arch.i386 && tests.pointer_32bit)
|| (arch.x86_64 && tests.pointer_64bit && features.sse2)
|| (arch.arm && tests.pointer_32bit && tests.arm_fp && tests.arm_thumb
&& (config.linux || config.ios || config.tvos || config.qnx))