diff options
author | Peter Hartmann <phartmann@rim.com> | 2012-09-20 14:11:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-01 10:22:06 +0200 |
commit | 80f6d7862c0e2e41768620d5bd81b0e1d5e3f61f (patch) | |
tree | 9e06efdf82597af4ed89ce5200aca898a137fba9 /mkspecs | |
parent | c6271071b4d0686fef8fe3df215ce84be0305a8b (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.
Change-Id: Iba300e9cb82f34043e7b36f8e45287a1aed2a1a5
Original-patch-by: Greg Bentz
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/blackberry-armv7le-qcc/qmake.conf | 8 | ||||
-rw-r--r-- | mkspecs/blackberry-x86-qcc/qmake.conf | 8 | ||||
-rw-r--r-- | mkspecs/common/qcc-base.conf | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/mkspecs/blackberry-armv7le-qcc/qmake.conf b/mkspecs/blackberry-armv7le-qcc/qmake.conf index 4a8cde7b16..2886527a5c 100644 --- a/mkspecs/blackberry-armv7le-qcc/qmake.conf +++ b/mkspecs/blackberry-armv7le-qcc/qmake.conf @@ -2,11 +2,17 @@ # qmake configuration for blackberry armv7le systems # +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 +contains(QT_CONFIG, stack-protector-strong) { + QMAKE_CFLAGS += -fstack-protector-strong +} else { + QMAKE_CFLAGS += -fstack-protector -fstack-protector-all +} include(../common/qcc-base-qnx-armv7le.conf) diff --git a/mkspecs/blackberry-x86-qcc/qmake.conf b/mkspecs/blackberry-x86-qcc/qmake.conf index 24bbffe920..4dc3da6c07 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 # +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 +contains(QT_CONFIG, stack-protector-strong) { + QMAKE_CFLAGS += -fstack-protector-strong +} else { + QMAKE_CFLAGS += -fstack-protector -fstack-protector-all +} include(../common/qcc-base-qnx-x86.conf) diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index b6abb8f52d..76d3d1362f 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -17,7 +17,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_APP += -fPIE QMAKE_CFLAGS_YACC += -Wno-unused -Wno-parentheses |