diff options
author | Björn Jacke <bj@sernet.de> | 2012-10-30 12:07:26 +0100 |
---|---|---|
committer | Bjoern Jacke <bj@sernet.de> | 2012-10-30 13:18:50 +0100 |
commit | fdead585dc11101761ac975935134c6a84ea3b4f (patch) | |
tree | 557eda9ea174fada841c2b2daf574e2f310cf4b4 | |
parent | 7fcb2532b99ddf65d78dd02ea06ce8a1a6229949 (diff) | |
download | samba-fdead585dc11101761ac975935134c6a84ea3b4f.tar.gz samba-fdead585dc11101761ac975935134c6a84ea3b4f.tar.bz2 samba-fdead585dc11101761ac975935134c6a84ea3b4f.zip |
ccan/wafbuild: use WERROR_CFLAGS instead of -Werror
-rw-r--r-- | lib/ccan/wscript | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/ccan/wscript b/lib/ccan/wscript index 4af9dd4c83..59b82059c9 100644 --- a/lib/ccan/wscript +++ b/lib/ccan/wscript @@ -7,26 +7,23 @@ def configure(conf): conf.CHECK_HEADERS('err.h') conf.CHECK_HEADERS('byteswap.h') conf.CHECK_FUNCS('bswap_64', link=False, headers="byteswap.h") - - # FIXME: if they don't have -Werror, these will all fail. But they - # probably will anyway... conf.CHECK_CODE('int __attribute__((cold)) func(int x) { return x; }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_COLD') conf.CHECK_CODE('int __attribute__((const)) func(int x) { return x; }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_CONST') conf.CHECK_CODE('void __attribute__((noreturn)) func(int x) { exit(x); }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_NORETURN') conf.CHECK_CODE('void __attribute__((format(__printf__, 1, 2))) func(const char *fmt, ...) { }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_PRINTF') conf.CHECK_CODE('int __attribute__((unused)) func(int x) { return x; }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_UNUSED') conf.CHECK_CODE('int __attribute__((used)) func(int x) { return x; }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_ATTRIBUTE_USED') # We try to use headers for a compile-time test. conf.CHECK_CODE(code = """#ifdef __BYTE_ORDER @@ -121,7 +118,7 @@ def configure(conf): link=True, define='HAVE_TYPEOF') conf.CHECK_CODE('int __attribute__((warn_unused_result)) func(int x) { return x; }', - addmain=False, link=False, cflags="-Werror", + addmain=False, link=False, cflags=conf.env['WERROR_CFLAGS'], define='HAVE_WARN_UNUSED_RESULT') # backtrace could be in libexecinfo or in libc |