V3 static data in classes vs AIX
David Edelsohn
dje@watson.ibm.com
Thu May 31 11:24:00 GMT 2001
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
More information about the Libstdc++
mailing list