wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba
authorStefan Metzmacher <metze@samba.org>
Wed, 7 Jan 2015 08:54:43 +0000 (09:54 +0100)
committerJeremy Allison <jra@samba.org>
Thu, 8 Jan 2015 22:38:07 +0000 (23:38 +0100)
This moves the check to the end of the configure run,
which means we no longer use this on configure checks,
but only for the real build.

This behavior is similar than our developer cflags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
buildtools/wafsamba/samba_autoconf.py
lib/replace/wscript

index 9e50ee54414265ca6b3eb4841a41e615d35e5045..ca1eac2ffbb14dab2c3143ea212993ee2820342f 100644 (file)
@@ -646,6 +646,10 @@ def SAMBA_CONFIG_H(conf, path=None):
     if not IN_LAUNCH_DIR(conf):
         return
 
+    if conf.CHECK_CFLAGS(['-fstack-protector']) and conf.CHECK_LDFLAGS(['-fstack-protector']):
+        conf.ADD_CFLAGS('-fstack-protector')
+        conf.ADD_LDFLAGS('-fstack-protector')
+
     if Options.options.debug:
         conf.ADD_CFLAGS('-g', testflags=True)
 
index 60b714a501ee132978393bb08c6060f941674866..4693a79c49d853bfc5bc40fbae1c0164b2b38716 100644 (file)
@@ -32,10 +32,6 @@ def configure(conf):
     conf.DEFINE('HAVE_LIBREPLACE', 1)
     conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
 
-    if conf.CHECK_CFLAGS(['-fstack-protector']) and conf.CHECK_LDFLAGS(['-fstack-protector']):
-        conf.ADD_CFLAGS('-fstack-protector')
-        conf.ADD_LDFLAGS('-fstack-protector')
-
     conf.CHECK_HEADERS('linux/types.h crypt.h locale.h acl/libacl.h compat.h')
     conf.CHECK_HEADERS('acl/libacl.h attr/xattr.h compat.h ctype.h dustat.h')
     conf.CHECK_HEADERS('fcntl.h fnmatch.h glob.h history.h krb5.h langinfo.h')