Remove FIXME from the v8base.pri
authorPeter Varga <pvarga@inf.u-szeged.hu>
Mon, 30 May 2011 14:23:29 +0000 (16:23 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 3 Aug 2011 12:12:52 +0000 (14:12 +0200)
Check the version of gcc and use -fno-strict-aliasing flag when it's
4.5.

Merge-request: 1
(This patch was cherry-pick from QtScript module)
Reviewed-by: Jedrzej Nowacki <jedrzej.nowacki@nokia.com>

Change-Id: I0086ec374c7cfd4c0842198734318c915c6cea8d
Reviewed-on: http://codereview.qt.nokia.com/2515
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>

src/declarative/v8/v8base.pri

index 209e4d5..9cea5cf 100644 (file)
@@ -11,8 +11,9 @@ isEmpty(V8DIR) {
 
     # mksnapshot hangs if gcc 4.5 is used
     # for reference look at http://code.google.com/p/v8/issues/detail?id=884
-    # FIXME how to find 4.5 series?
-    message(because of a bug in gcc / v8 we need to add -fno-strict-aliasing)
-    QMAKE_CFLAGS += -fno-strict-aliasing
-    QMAKE_CXXFLAGS += -fno-strict-aliasing
+    equals(QT_GCC_MAJOR_VERSION, 4): equals(QT_GCC_MINOR_VERSION, 5) {
+      message(because of a bug in gcc / v8 we need to add -fno-strict-aliasing)
+      QMAKE_CFLAGS += -fno-strict-aliasing
+      QMAKE_CXXFLAGS += -fno-strict-aliasing
+    }
 }