------- Additional Comments From jakub at redhat dot com 2005-07-14 15:24 ------- IMHO either we want to just force what must have default visibility to have the default visibility (in mt_allocator.h case it is _S_get_pool), as in: --- ext/mt_allocator.h 2005-05-20 03:36:29.000000000 +0200 +++ ext/mt_allocator.h 2005-07-14 17:17:49.000000000 +0200 @@ -413,7 +413,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __common_pool_policy<_PoolTp1, _Thread1> other; };
- static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { static pool_type _S_pool; @@ -444,7 +444,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __common_pool_policy<_PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { static pool_type _S_pool; @@ -490,7 +490,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __per_type_pool_policy<_Tp1, _PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { // Sane defaults for the _PoolTp. @@ -536,7 +536,7 @@ namespace __gnu_cxx struct _M_rebind { typedef __per_type_pool_policy<_Tp1, _PoolTp1, _Thread1> other; }; - static pool_type& + static __attribute__((visibility ("default"))) pool_type& _S_get_pool() { // Sane defaults for the _PoolTp. (of course together with a libstdc++-v3/configure check for visibility attribute and using a macro for that, __gxx_default_visibility or something like that). Not sure what other places in libstdc++-v3 headers rely on having the default visibility. Alternatively, we claim that all of libstdc++-v3 header stuff (or most of it) needs default visibility and add #pragma GCC visibility push(default) ... #pragma GCC visibility pop markers around (most of) libstdc++-v3 headers, like it has been already added for libsupc++ headers. This wasn't possible earlier when we had the 16 GCC visibility pragmas stacking limit, but now that it is gone, we can fix that up. Of course the issues Roger raised need to be solved as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22482