summaryrefslogtreecommitdiffstats
path: root/mkspecs/features
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-01-16 19:41:11 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-18 04:39:14 +0100
commit8cbc47ec49295c502ec91a71848f8ba3a1fe9b76 (patch)
tree168d6c433d5c025e6aedbf8878873b6fd421f42c /mkspecs/features
parentf2792a9cf0e5c628ba1481c47ee6b98524e6b87a (diff)
Don't pass -mfpmath=sse to Clang < 3.4, it's not supported
Change-Id: I875f72802d8745488d34f836818b21aafe69dcff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r--mkspecs/features/qt_module.prf12
1 files changed, 11 insertions, 1 deletions
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
index c83133075b..32a722fb53 100644
--- a/mkspecs/features/qt_module.prf
+++ b/mkspecs/features/qt_module.prf
@@ -137,7 +137,17 @@ sse2:!contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):!host_build:!if(static:contains(
QMAKE_CFLAGS += $$QMAKE_CFLAGS_SSE2
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_SSE2
}
-gcc:equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2) {
+
+clang {
+ apple_clang_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
+ reg_clang_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
+ !lessThan(apple_clang_ver, "5.1")|!lessThan(reg_clang_ver, "3.4"): \
+ CONFIG += compiler_supports_fpmath
+} else: gcc {
+ CONFIG += compiler_supports_fpmath
+}
+
+equals(QT_ARCH, i386):contains(QT_CPU_FEATURES.$$QT_ARCH, sse2):compiler_supports_fpmath {
# Turn on SSE-based floating-point math
QMAKE_CFLAGS += -mfpmath=sse
QMAKE_CXXFLAGS += -mfpmath=sse