Moving stack-smashing protection to the Blackberry mkspecs
authorSean Harmer <sean.harmer.qnx@kdab.com>
Thu, 5 Apr 2012 15:46:18 +0000 (16:46 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 5 Apr 2012 22:02:45 +0000 (00:02 +0200)
It transpires that QNX 6.5.0 does not yet have libc support for the
gcc stack smashing protection.

Change-Id: Ic635662b6aa3ce2fad5f69e236386ae9ace420db
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
mkspecs/common/qcc-base.conf
mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf
mkspecs/unsupported/blackberry-x86-qcc/qmake.conf

index a2aefc6..aa6abee 100644 (file)
@@ -7,10 +7,9 @@
 #
 # 1) -pipe is removed as it's on by default in qcc (and has an analogous -nopipe option)
 # 2) -Wno-psabi is added to silence harmless warnings about va_list mangling
-# 3) -fstack-protector -fstack-protector-all is added to enable stack smashing protection
 #
 
-QMAKE_CFLAGS                += -Wno-psabi -fstack-protector -fstack-protector-all
+QMAKE_CFLAGS                += -Wno-psabi
 QMAKE_CFLAGS_DEPS           += -M
 QMAKE_CFLAGS_WARN_ON        += -Wall -W
 QMAKE_CFLAGS_WARN_OFF       += -w
index df9961b..4e72667 100644 (file)
@@ -6,4 +6,7 @@ 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)
index 2cb405c..60b67f8 100644 (file)
@@ -6,4 +6,7 @@ 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)