summaryrefslogtreecommitdiff
path: root/buildtools/wafsamba/samba_autoconf.py
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2011-05-10 11:37:30 +0930
committerRusty Russell <rusty@rustcorp.com.au>2011-05-10 11:37:30 +0930
commit3ccfe7cb7be80cc6fa5b8fc437af72168515b892 (patch)
tree5cffc562f0ca696ceef13490e0e10b7b6c4355b9 /buildtools/wafsamba/samba_autoconf.py
parent14f99167f600ae9a3351d4ff7d089e54ca3149ac (diff)
downloadsamba-3ccfe7cb7be80cc6fa5b8fc437af72168515b892.tar.gz
samba-3ccfe7cb7be80cc6fa5b8fc437af72168515b892.tar.bz2
samba-3ccfe7cb7be80cc6fa5b8fc437af72168515b892.zip
Add -fno-common where supported (WAF only)
Normally under UNIX, uninitialized non-static global variables get placed in the "common" section, where they are merged at link time. This means if two C files define "int debug", they will end up referring to the same variable. Or if one does "float level" and the other does "int level" you'll get an accidental union. Such bugs can be hard to track down; fortunately GCC offers -fno-common to disable this feature. It didn't reveal any places which need fixing, however). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'buildtools/wafsamba/samba_autoconf.py')
-rw-r--r--buildtools/wafsamba/samba_autoconf.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 174ca14210..207d7320b9 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -597,7 +597,7 @@ def SAMBA_CONFIG_H(conf, path=None):
if Options.options.developer:
# we add these here to ensure that -Wstrict-prototypes is not set during configure
- conf.ADD_CFLAGS('-Wall -g -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k -Wmissing-prototypes',
+ conf.ADD_CFLAGS('-Wall -g -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -Wformat=2 -Wno-format-y2k -Wmissing-prototypes -fno-common',
testflags=True)
if os.getenv('TOPLEVEL_BUILD'):
conf.ADD_CFLAGS('-Wcast-qual', testflags=True)