From 208be32c6a9b275c507fb5e3334b832a3cb9578a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 7 Jan 2015 09:54:43 +0100 Subject: [PATCH] wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba 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 Reviewed-by: Ralph Boehme --- buildtools/wafsamba/samba_autoconf.py | 4 ++++ lib/replace/wscript | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 9e50ee54414..ca1eac2ffbb 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -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) diff --git a/lib/replace/wscript b/lib/replace/wscript index 60b714a501e..4693a79c49d 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -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') -- 2.11.4.GIT