1
0
libqt5-qtdeclarative/sse2_nojit.patch
Stephan Kulow fca35fc28e Accepting request 251482 from KDE:Qt5
- Add sse2_nojit.patch: enable JIT and sse2 only on sse2 case
- Build QtQML module twice on ix86, without and with sse2 (sse2 library is placed to %_libdir/sse2/ (bnc#897758)


depends on sr#251413

OBS-URL: https://build.opensuse.org/request/show/251482
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtdeclarative?expand=0&rev=20
2014-09-25 07:33:21 +00:00

27 lines
1013 B
Diff

diff --git a/src/qml/jsruntime/jsruntime.pri b/src/qml/jsruntime/jsruntime.pri
index 72010d3..2bd5acb 100644
--- a/src/qml/jsruntime/jsruntime.pri
+++ b/src/qml/jsruntime/jsruntime.pri
@@ -107,7 +107,7 @@ SOURCES += \
# Use SSE2 floating point math on 32 bit instead of the default
# 387 to make test results pass on 32 and on 64 bit builds.
-linux-g++*:isEqual(QT_ARCH,i386) {
+linux-g++*:isEqual(QT_ARCH,i386):!no_sse2 {
QMAKE_CFLAGS += -march=pentium4 -msse2 -mfpmath=sse
QMAKE_CXXFLAGS += -march=pentium4 -msse2 -mfpmath=sse
}
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index a00231c..2a8f5d3 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -75,7 +75,7 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
// White list architectures
-#if defined(Q_PROCESSOR_X86)
+#if defined(Q_PROCESSOR_X86) && defined(__SSE2__)
#define V4_ENABLE_JIT
#elif defined(Q_PROCESSOR_X86_64)
#define V4_ENABLE_JIT