diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-03-10 16:15:14 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-04-02 09:03:45 +0200 |
commit | e21aa7bf098a7f2e9c0d0b5bd73dbfcc73ec494a (patch) | |
tree | 66c650ba90184838bad9cdfb3aa545f28c232d49 /buildtools | |
parent | 0e6169626a2be3e127b6a7f1a7d06ed722e7d9b6 (diff) | |
download | samba-e21aa7bf098a7f2e9c0d0b5bd73dbfcc73ec494a.tar.gz samba-e21aa7bf098a7f2e9c0d0b5bd73dbfcc73ec494a.tar.xz samba-e21aa7bf098a7f2e9c0d0b5bd73dbfcc73ec494a.zip |
wafsamba: use multiple conf.ADD_CFLAGS() lines for developer CFLAGS
We first check for warn flags then for error flags.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r-- | buildtools/wafsamba/samba_autoconf.py | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py index e726536eb4..c0430bcb3b 100644 --- a/buildtools/wafsamba/samba_autoconf.py +++ b/buildtools/wafsamba/samba_autoconf.py @@ -643,16 +643,31 @@ def SAMBA_CONFIG_H(conf, path=None): return if Options.options.debug: - conf.ADD_CFLAGS('-g', - testflags=True) + conf.ADD_CFLAGS('-g', testflags=True) if Options.options.developer: + conf.env.DEVELOPER_MODE = True + + conf.ADD_CFLAGS('-g', testflags=True) + conf.ADD_CFLAGS('-Wall', testflags=True) + conf.ADD_CFLAGS('-Wshadow', testflags=True) + conf.ADD_CFLAGS('-Wmissing-prototypes', testflags=True) + conf.ADD_CFLAGS('-Wcast-align -Wcast-qual', testflags=True) + conf.ADD_CFLAGS('-fno-common', testflags=True) + conf.ADD_CFLAGS('-Wdeclaration-after-statement', testflags=True) + + conf.ADD_CFLAGS('-Werror=address', testflags=True) # we add these here to ensure that -Wstrict-prototypes is not set during configure - conf.ADD_CFLAGS('-Wall -g -Wshadow -Werror=strict-prototypes -Wstrict-prototypes -Werror=pointer-arith -Wpointer-arith -Wcast-align -Werror=write-strings -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k -Wmissing-prototypes -fno-common -Werror=address -Wdeclaration-after-statement', + conf.ADD_CFLAGS('-Werror=strict-prototypes -Wstrict-prototypes', + testflags=True) + conf.ADD_CFLAGS('-Werror=write-strings -Wwrite-strings', + testflags=True) + conf.ADD_CFLAGS('-Werror-implicit-function-declaration', + testflags=True) + conf.ADD_CFLAGS('-Werror=pointer-arith -Wpointer-arith', testflags=True) - conf.ADD_CFLAGS('-Wcast-qual', testflags=True) - conf.env.DEVELOPER_MODE = True + conf.ADD_CFLAGS('-Wformat=2 -Wno-format-y2k', testflags=True) # This check is because for ldb_search(), a NULL format string # is not an error, but some compilers complain about that. if CHECK_CFLAGS(conf, ["-Werror=format", "-Wformat=2"], ''' |