Add -fno-common where supported (WAF only)
rusty at rustcorp.com.au
Sun May 15 01:06:44 MDT 2011
On Thu, 12 May 2011 16:43:04 +0200, Andrew Bartlett <abartlet at samba.org> wrote:
> On Tue, 2011-05-10 at 05:22 +0200, Rusty Russell wrote:
> > 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 at rustcorp.com.au>
> this breaks 'make SYMBOLCHECK=1', due to __progname in the setprogname
> implementation in Heimdal.
> Can you look into this, and determine if the Heimdal roken use was
> invalid, or if it was deliberately referencing the __progname in the
> system libs? It is fatally reported as a duplicate with my system libs,
> when I run that.
OK, if it wanted the one in the system libraries, it should be using
'extern const char *__progname;'. The problem seems to be that you
have __progname, yet this is getting compiled:
const char *__progname;
We don't have a configuration test for HAVE___PROGNAME that I can tell,
yet it seems it should be set on your system?
More information about the samba-technical