wafbuild: use -Wstack-protector if available
authorBjörn Jacke <bj@sernet.de>
Tue, 30 Oct 2012 12:00:58 +0000 (13:00 +0100)
committerBjoern Jacke <bj@sernet.de>
Tue, 30 Oct 2012 14:04:30 +0000 (15:04 +0100)
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Oct 30 15:04:30 CET 2012 on sn-devel-104

lib/replace/wscript

index 9a6be208de7231559b0168acbe1380e2b034558b..9dfa985aec983b791690964d1d544dd891d9db56 100644 (file)
@@ -53,6 +53,9 @@ struct foo bar = { .y = 'X', .x = 1 };
                 conf.ADD_CFLAGS(f)
             break
 
+    if conf.CHECK_CFLAGS(['-Wstack-protector']):
+           conf.ADD_CFLAGS('-Wstack-protector')
+
     # Try to find the right extra flags for -Werror behaviour
     for f in ["-Werror",       # GCC
              "-errwarn=%all", # Sun Studio