libqt5-qtdeclarative/sse2_nojit.patch
Stephan Kulow 496a1fa8e0 Accepting request 304230 from KDE:Qt5
- Add avoid-calling-potentially-pure-virtual-method.patch, QTBUG#45753

- Extend sse2_nojit.patch to warn users without SSE2 extension that
  their processor is officially not supported.
  Also pass -msse2 -mfpmath=sse flags when we are building with SSE2

OBS-URL: https://build.opensuse.org/request/show/304230
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=24
2015-05-11 17:24:41 +00:00

43 lines
1.6 KiB
Diff

diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri
index c27aaa9..05c86e8 100644
--- a/src/qml/jsruntime/jsruntime.pri
+++ b/src/qml/jsruntime/jsruntime.pri
@@ -105,6 +105,11 @@ SOURCES += \
$$PWD/qv4string.cpp \
$$PWD/qv4value.cpp
+linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 {
+ QMAKE_CFLAGS += -msse2 -mfpmath=sse
+ QMAKE_CXXFLAGS += -msse2 -mfpmath=sse
+}
+
valgrind {
DEFINES += V4_USE_VALGRIND
}
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index a58beb3..85e8dc0 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -85,7 +85,7 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
// Black list some platforms
#if defined(V4_ENABLE_JIT)
-#if defined(Q_OS_IOS) || defined(Q_OS_WINRT)
+#if defined(Q_OS_IOS) || defined(Q_OS_WINRT) || (defined(Q_PROCESSOR_X86) && !defined(__SSE2__))
# undef V4_ENABLE_JIT
#endif
#endif
diff --git a/src/qml/qml/v8/qv8engine.cpp b/src/qml/qml/v8/qv8engine.cpp
index 39b816f..762ee61 100644
--- a/src/qml/qml/v8/qv8engine.cpp
+++ b/src/qml/qml/v8/qv8engine.cpp
@@ -123,7 +123,7 @@ QV8Engine::QV8Engine(QJSEngine* qq)
{
#ifdef Q_PROCESSOR_X86_32
if (!qCpuHasFeature(SSE2)) {
- qFatal("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer");
+ qDebug("This program requires an X86 processor that supports SSE2 extension, at least a Pentium 4 or newer, processors missing the extension are NOT supported to run QML2 code!");
}
#endif