Skip to content

Commit

Permalink
Fix QNX build on Windows
Browse files Browse the repository at this point in the history
Configure on Windows in Qt 5.6 does not detect the target gcc version
correctly and reports the host gcc version instead. That means we'll end
up enabling -fno-lifetime-dse with a gcc version that doesn't support it
and consequently fail to build.

Since in the 5.6 branch we only support QNX 6 and we know that the gcc
version is 4.7 and thus not affected by the DSE problem, we might as
well unconditionally disable the workaround there.

This change is only for 5.6 as 5.8/5.9 and newer detect the gcc version
correctly _and_ don't need the -fno-lifetime-dse workaround anymore.

Task-number: QTBUG-62820
Change-Id: I55baf532a9126eb2f8c5f11858d52cccad6c355b
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
  • Loading branch information
tronical authored and gladhorn committed Sep 6, 2017
1 parent 6eaaedc commit a8cff0a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/imports/particles/particles.pro
Expand Up @@ -3,7 +3,7 @@ TARGET = particlesplugin
TARGETPATH = QtQuick/Particles.2
IMPORT_VERSION = 2.0

greaterThan(QT_GCC_MAJOR_VERSION, 5) {
greaterThan(QT_GCC_MAJOR_VERSION, 5):!qnx {
# Our code is bad. Temporary workaround. Fixed in 5.8
QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}
Expand Down
2 changes: 1 addition & 1 deletion src/qml/qml.pro
Expand Up @@ -16,7 +16,7 @@ exists("qqml_enable_gcov") {
LIBS_PRIVATE += -lgcov
}

greaterThan(QT_GCC_MAJOR_VERSION, 5) {
greaterThan(QT_GCC_MAJOR_VERSION, 5):!qnx {
# Our code is bad. Temporary workaround.
QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}
Expand Down
2 changes: 1 addition & 1 deletion src/quick/quick.pro
Expand Up @@ -13,7 +13,7 @@ exists("qqml_enable_gcov") {
LIBS_PRIVATE += -lgcov
}

greaterThan(QT_GCC_MAJOR_VERSION, 5) {
greaterThan(QT_GCC_MAJOR_VERSION, 5):!qnx {
# Our code is bad. Temporary workaround. Fixed in 5.8
QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}
Expand Down
2 changes: 1 addition & 1 deletion tests/auto/qml/qqmlecmascript/qqmlecmascript.pro
Expand Up @@ -13,7 +13,7 @@ RESOURCES += qqmlecmascript.qrc

include (../../shared/util.pri)

greaterThan(QT_GCC_MAJOR_VERSION, 5) {
greaterThan(QT_GCC_MAJOR_VERSION, 5):!qnx {
# Our code is bad. Temporary workaround. Fixed in 5.8
QMAKE_CXXFLAGS += -fno-delete-null-pointer-checks -fno-lifetime-dse
}
Expand Down

0 comments on commit a8cff0a

Please sign in to comment.