contrib: qtdeclarative: Disable the JIT when targeting windows/armv7
authorMartin Storsjö <martin@martin.st>
Mon, 4 Feb 2019 11:30:28 +0000 (13:30 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 16 Apr 2019 20:24:05 +0000 (23:24 +0300)
The JIT doesn't support this OS/arch combination, but used to
blindly enable the JIT on any 32 bit arm target, except for iOS.

This is a cherrypick of an upstream patch.

contrib/src/qtdeclarative/0001-V4-Only-enable-the-JIT-on-ARM-on-specific-known-OSes.patch [new file with mode: 0644]
contrib/src/qtdeclarative/rules.mak

diff --git a/contrib/src/qtdeclarative/0001-V4-Only-enable-the-JIT-on-ARM-on-specific-known-OSes.patch b/contrib/src/qtdeclarative/0001-V4-Only-enable-the-JIT-on-ARM-on-specific-known-OSes.patch
new file mode 100644 (file)
index 0000000..0901ff6
--- /dev/null
@@ -0,0 +1,38 @@
+From 259c958e21c63f227a1bb678867210e0f6af0991 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
+Date: Mon, 15 Apr 2019 13:36:46 +0300
+Subject: [PATCH] V4: Only enable the JIT on ARM on specific known OSes
+
+On all other architectures, the JIT is only enabled for explicitly
+mentioned OSes.
+
+This fixes build errors for Windows on 32 bit ARM, about the
+cacheFlush function being unimplemented for that target.
+
+This keeps all other OSes enabled that are mentioned in conditionals
+for other architectures, except for windows.
+
+Change-Id: I8c29a9399a05a57d23b4fee506c3d04859a08a76
+Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
+Upstream-Commit: 259c958e21c63f227a1bb678867210e0f6af0991
+---
+ src/qml/jsruntime/qv4global_p.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
+index 162fb66cb..58bffdf2d 100644
+--- a/src/qml/jsruntime/qv4global_p.h
++++ b/src/qml/jsruntime/qv4global_p.h
+@@ -94,7 +94,8 @@ inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
+ #elif defined(Q_PROCESSOR_X86_64) && (QT_POINTER_SIZE == 8) \
+     && (defined(Q_OS_WIN) || defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_MAC) || defined(Q_OS_FREEBSD))
+ #  define V4_ENABLE_JIT
+-#elif defined(Q_PROCESSOR_ARM_32) && (QT_POINTER_SIZE == 4)
++#elif defined(Q_PROCESSOR_ARM_32) && (QT_POINTER_SIZE == 4) \
++    && (defined(Q_OS_LINUX) || defined(Q_OS_QNX) || defined(Q_OS_FREEBSD) || defined(Q_OS_INTEGRITY))
+ #  if defined(thumb2) || defined(__thumb2__) || ((defined(__thumb) || defined(__thumb__)) && __TARGET_ARCH_THUMB-0 == 4)
+ #    define V4_ENABLE_JIT
+ #  elif defined(__ARM_ARCH_ISA_THUMB) && __ARM_ARCH_ISA_THUMB == 2 // clang 3.5 and later will set this if the core supports the Thumb-2 ISA.
+-- 
+2.17.1
+
index 7fdc618..7829002 100644 (file)
@@ -21,6 +21,7 @@ $(TARBALLS)/qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz:
 
 qtdeclarative: qtdeclarative-everywhere-src-$(QTDECLARATIVE_VERSION).tar.xz .sum-qtdeclarative
        $(UNPACK)
+       $(APPLY) $(SRC)/qtdeclarative/0001-V4-Only-enable-the-JIT-on-ARM-on-specific-known-OSes.patch
        $(MOVE)
 
 .qtdeclarative: qtdeclarative