waf: add -fstack-protector to LDFLAGS if detected.
authorIra Cooper <ira@samba.org>
Wed, 6 Mar 2013 00:54:43 +0000 (00:54 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 6 Mar 2013 03:06:04 +0000 (04:06 +0100)
If we compile with -fstack-protector, we should link
with it.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar  6 04:06:04 CET 2013 on sn-devel-104

lib/replace/wscript

index 36a9f6a3669682f2c4d9d4a7824a31af01629fac..9483e230891705b9ca5bf0ff8fae49b1e5940ea5 100644 (file)
@@ -55,6 +55,7 @@ struct foo bar = { .y = 'X', .x = 1 };
 
     if conf.CHECK_CFLAGS(['-fstack-protector']):
         conf.ADD_CFLAGS('-fstack-protector')
+        conf.ADD_LDFLAGS('-fstack-protector')
 
     # Try to find the right extra flags for -Werror behaviour
     for f in ["-Werror",       # GCC