summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2015-01-07 09:52:53 +0100
committerJeremy Allison <jra@samba.org>2015-01-08 23:38:07 +0100
commit0f4ce418ae1410a294aa6e629beea68c6a16aff8 (patch)
tree3ff13119e630ed4fb18867c8ccd2c04a38918074
parent7a3dc668528f398458851aca5d27ff789414343a (diff)
downloadsamba-0f4ce418ae1410a294aa6e629beea68c6a16aff8.tar.gz
wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rwxr-xr-xbuildtools/wafsamba/wscript13
-rw-r--r--lib/replace/wscript13
2 files changed, 13 insertions, 13 deletions
diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 917a6921539..0e2afe11490 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -295,6 +295,19 @@ def configure(conf):
headers='stdio.h',
msg='Checking simple C program')
+ # Try to find the right extra flags for -Werror behaviour
+ for f in ["-Werror", # GCC
+ "-errwarn=%all", # Sun Studio
+ "-qhalt=w", # IBM xlc
+ "-w2", # Tru64
+ ]:
+ if conf.CHECK_CFLAGS([f], '''
+'''):
+ if not 'WERROR_CFLAGS' in conf.env:
+ conf.env['WERROR_CFLAGS'] = []
+ conf.env['WERROR_CFLAGS'].extend([f])
+ break
+
# check which compiler/linker flags are needed for rpath support
if not conf.CHECK_LDFLAGS(['-Wl,-rpath,.']) and conf.CHECK_LDFLAGS(['-Wl,-R,.']):
conf.env['RPATH_ST'] = '-Wl,-R,%s'
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 0f295140eda..60b714a501e 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -36,19 +36,6 @@ def configure(conf):
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
- "-errwarn=%all", # Sun Studio
- "-qhalt=w", # IBM xlc
- "-w2", # Tru64
- ]:
- if conf.CHECK_CFLAGS([f], '''
-'''):
- if not 'WERROR_CFLAGS' in conf.env:
- conf.env['WERROR_CFLAGS'] = []
- conf.env['WERROR_CFLAGS'].extend([f])
- break
-
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')