Enable stack smashing protection on QNX and Blackberry platforms
authorSean Harmer <sean.harmer.qnx@kdab.com>
Mon, 2 Apr 2012 10:37:59 +0000 (11:37 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 3 Apr 2012 23:03:27 +0000 (01:03 +0200)
Change-Id: I2610c8e446a74ee584c5b450e1b872b7cda50813
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
mkspecs/common/qcc-base.conf

index a9e86ef..a2aefc6 100644 (file)
@@ -3,11 +3,14 @@
 #
 # - The QNX qcc compiler
 #
-# The only difference between this and gcc-base.conf is that -pipe is removed
-# as it's on by default in qcc (and has an analogous -nopipe option)
+# The differences between this and gcc-base.conf are that
+#
+# 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
+QMAKE_CFLAGS                += -Wno-psabi -fstack-protector -fstack-protector-all
 QMAKE_CFLAGS_DEPS           += -M
 QMAKE_CFLAGS_WARN_ON        += -Wall -W
 QMAKE_CFLAGS_WARN_OFF       += -w