From 918bf89dc760e007a36c90be34b4627eb2141157 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Jacke?= Date: Sun, 10 Feb 2019 01:29:22 +0100 Subject: [PATCH] waf: use the correct WERROR_CFLAGS in CHECK_CODE all the non gcc version were incorrectly set here till now Signed-off-by: Bjoern Jacke Reviewed-by: Andreas Schneider --- buildtools/wafsamba/samba_autoconf.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index 9d45ada1312..7d975393c5b 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -397,13 +397,8 @@ def CHECK_CODE(conf, code, define, # Be strict when relying on a compiler check # Some compilers (e.g. xlc) ignore non-supported features as warnings if strict: - extra_cflags = None - if conf.env["CC_NAME"] == "gcc": - extra_cflags = "-Werror" - elif conf.env["CC_NAME"] == "xlc": - extra_cflags = "-qhalt=w" - if extra_cflags: - cflags.append(extra_cflags) + if 'WERROR_CFLAGS' in conf.env: + cflags.extend(conf.env['WERROR_CFLAGS']) if local_include: cflags.append('-I%s' % conf.path.abspath()) -- 2.34.1