summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorPeter Hartmann <phartmann@rim.com>2012-09-20 14:11:25 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-14 10:56:08 +0200
commite25f67d3e6ba6aa24a355010e0dc3baadbbacb8b (patch)
tree230af0f7d8e04348a97ce274615a45e5b3ff2d41 /mkspecs
parent3fbc68b372741d04f477915bb09efbd2a277a570 (diff)
Blackberry mkspecs: Refine compiler options
stack-protector-strong gives performance benefits over stack-protector-all and is still checking more than -stack-protector, so seems to be a good middle way and we want to use it when it is there. The -shared option for the compiler (not the linker) prevents a RIM internal version of qcc from forcing -fPIE, and should not harm in general when set. In addition, add a method "compilerSupportsFlag" for Windows as is present in the Unix configure script. Original-patch-by: Greg Bentz (cherry picked from commit 80f6d7862c0e2e41768620d5bd81b0e1d5e3f61f) Change-Id: I5867fc03dde1ef6e2fbf3747bdb9aaf15518eb6a Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/blackberry-armv7le-qcc/qmake.conf12
-rw-r--r--mkspecs/blackberry-x86-qcc/qmake.conf12
-rw-r--r--mkspecs/common/qcc-base.conf2
3 files changed, 19 insertions, 7 deletions
diff --git a/mkspecs/blackberry-armv7le-qcc/qmake.conf b/mkspecs/blackberry-armv7le-qcc/qmake.conf
index 4e72667c5d..5edcf0ee10 100644
--- a/mkspecs/blackberry-armv7le-qcc/qmake.conf
+++ b/mkspecs/blackberry-armv7le-qcc/qmake.conf
@@ -2,11 +2,17 @@
# qmake configuration for blackberry x86 systems
#
+include(../qnx-armv7le-qcc/qmake.conf)
+
+load(qt_config)
+
DEFINES += Q_OS_BLACKBERRY
CONFIG += blackberry
LIBS += -lbps
# Blackberry also has support for stack smashing protection in its libc
-QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
-
-include(../qnx-armv7le-qcc/qmake.conf)
+contains(QT_CONFIG, stack-protector-strong) {
+ QMAKE_CFLAGS += -fstack-protector-strong
+} else {
+ QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
+}
diff --git a/mkspecs/blackberry-x86-qcc/qmake.conf b/mkspecs/blackberry-x86-qcc/qmake.conf
index 60b67f801e..45d6c4b96c 100644
--- a/mkspecs/blackberry-x86-qcc/qmake.conf
+++ b/mkspecs/blackberry-x86-qcc/qmake.conf
@@ -2,11 +2,17 @@
# qmake configuration for blackberry x86 systems
#
+include(../qnx-x86-qcc/qmake.conf)
+
+load(qt_config)
+
DEFINES += Q_OS_BLACKBERRY
CONFIG += blackberry
LIBS += -lbps
# Blackberry also has support for stack smashing protection in its libc
-QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
-
-include(../qnx-x86-qcc/qmake.conf)
+contains(QT_CONFIG, stack-protector-strong) {
+ QMAKE_CFLAGS += -fstack-protector-strong
+} else {
+ QMAKE_CFLAGS += -fstack-protector -fstack-protector-all
+}
diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf
index 6f8d336186..3ceaa8e942 100644
--- a/mkspecs/common/qcc-base.conf
+++ b/mkspecs/common/qcc-base.conf
@@ -14,7 +14,7 @@ QMAKE_CFLAGS_WARN_ON += -Wall -W
QMAKE_CFLAGS_WARN_OFF += -w
QMAKE_CFLAGS_RELEASE += -O2
QMAKE_CFLAGS_DEBUG += -g
-QMAKE_CFLAGS_SHLIB += -fPIC
+QMAKE_CFLAGS_SHLIB += -fPIC -shared
QMAKE_CFLAGS_STATIC_LIB += -fPIC
QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses
QMAKE_CFLAGS_HIDESYMS += -fvisibility=hidden