Add -fno-common where supported (WAF only)
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 10 May 2011 02:07:30 +0000 (11:37 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 10 May 2011 02:07:30 +0000 (11:37 +0930)
commit3ccfe7cb7be80cc6fa5b8fc437af72168515b892
tree5cffc562f0ca696ceef13490e0e10b7b6c4355b9
parent14f99167f600ae9a3351d4ff7d089e54ca3149ac
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>
buildtools/wafsamba/samba_autoconf.py