summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2013-02-19 19:09:25 +0100
committerBjoern Jacke <bj@sernet.de>2013-02-22 15:38:21 +0100
commit240a55249d00c1e73400b480d4bc924edae94022 (patch)
tree9b3e4e8feab381606d6f2f23bc38efe7e47289e2
parentd537d64ab88ed3526425a71730acc0a36f7aab63 (diff)
downloadsamba-240a55249d00c1e73400b480d4bc924edae94022.tar.gz
samba-240a55249d00c1e73400b480d4bc924edae94022.tar.bz2
samba-240a55249d00c1e73400b480d4bc924edae94022.zip
build: use -fstack-protector if available
Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Matthieu Patou <mat@samba.org> Autobuild-User(master): Björn Jacke <bj@sernet.de> Autobuild-Date(master): Fri Feb 22 15:38:21 CET 2013 on sn-devel-104
-rw-r--r--lib/replace/wscript3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 266ca47d4c..47735be9e6 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -53,6 +53,9 @@ struct foo bar = { .y = 'X', .x = 1 };
conf.ADD_CFLAGS(f)
break
+ if conf.CHECK_CFLAGS(['-fstack-protector']):
+ conf.ADD_CFLAGS('-fstack-protector')
+
# Try to find the right extra flags for -Werror behaviour
for f in ["-Werror", # GCC
"-errwarn=%all", # Sun Studio