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)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 Jan 2015 10:02:15 +0000 (11:02 +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>
(cherry picked from commit 208be32c6a9b275c507fb5e3334b832a3cb9578a)

buildtools/wafsamba/samba_autoconf.py
lib/replace/wscript

index c1938731164db40efc52895b80aa42c4ff287f3b..54bb31332c554f2f2462e9a30392e60d9bc6cd42 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')