This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
V3 static data in classes vs AIX
- To: libstdc++ at gcc dot gnu dot org
- Subject: V3 static data in classes vs AIX
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Thu, 31 May 2001 14:23:58 -0400
- cc: Mark Mitchell <mark at codesourcery dot com>
The remaining V3 failures on AIX seem to be because of static
variables in classes that somehow are suppose to be commonly accessed in
shared libraries. This is most prevalent in
V3/include/bits/locale_facets.h:
public:
static locale::id id;
static int _S_pword_ix;
The header file creates a common symbol reference in the application while
the library contains the definition. When linked statically, the two are
merged (with a duplicate symbol warning). When linked shared, the
application and the library each use their own definitions.
If I manually remove the common symbol in the application and
allow it to use the library definition, everything works.
I assume that this is another case where SVR4 uses weak symbols to
define a single, global instance -- a feature which AIX does not yet have.
Can locale::id be made global?
David