From ec17c3d029f608405252eca20e72b69e58e42b2c Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@digia.com>
Date: Fri, 12 Sep 2014 12:50:34 +0200
Subject: [PATCH] Disable jitted Regexp for Mingw 64 bit

Work around bugs in either the jitted code, or the gcc compiler for
Windows that lead to incorrect JavaScript evaluations, most notably in
RegExp. This greatly reduces also the number of autotest failures.

Task-number: QTBUG-40814
Change-Id: I3045738c8e97b7fc4c12238f1163dd2b844ef877
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
---
 src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
index 6ee0aed2..ec27eebe 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
@@ -56,6 +56,9 @@ contains(JAVASCRIPTCORE_JIT,no) {
     DEFINES+=ENABLE_YARR=0
 }
 
+# YARR_JIT has known issues on mingw 64 bit, see QTBUG-40814
+mingw:equals(QT_ARCH, x86_64): DEFINES+=ENABLE_YARR_JIT=0
+
 # Rules when JIT enabled (not disabled)
 !contains(DEFINES, ENABLE_JIT=0) {
     linux*-g++*:greaterThan(QT_GCC_MAJOR_VERSION,3):greaterThan(QT_GCC_MINOR_VERSION,0) {
-- 
GitLab