From 1c20c3f29441a6856c6eb58dda40b86bdaac6a06 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Thu, 5 Apr 2012 16:46:18 +0100 Subject: [PATCH] Moving stack-smashing protection to the Blackberry mkspecs 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 Reviewed-by: Stephen Kelly Reviewed-by: Oswald Buddenhagen --- mkspecs/common/qcc-base.conf | 3 +-- mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf | 3 +++ mkspecs/unsupported/blackberry-x86-qcc/qmake.conf | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mkspecs/common/qcc-base.conf b/mkspecs/common/qcc-base.conf index a2aefc6..aa6abee 100644 --- a/mkspecs/common/qcc-base.conf +++ b/mkspecs/common/qcc-base.conf @@ -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 diff --git a/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf b/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf index df9961b..4e72667 100644 --- a/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf +++ b/mkspecs/unsupported/blackberry-armv7le-qcc/qmake.conf @@ -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) diff --git a/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf b/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf index 2cb405c..60b67f8 100644 --- a/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf +++ b/mkspecs/unsupported/blackberry-x86-qcc/qmake.conf @@ -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) -- 2.7.4