https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108969
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Florian Weimer from comment #6) > (In reply to Jonathan Wakely from comment #2) > > --- a/libstdc++-v3/src/c++98/globals_io.cc > > +++ b/libstdc++-v3/src/c++98/globals_io.cc > > @@ -43,6 +43,12 @@ > > // In macro form: > > // _GLIBCXX_ASM_SYMVER(currentname, oldname, GLIBCXX_3.2) > > > > +#if __has_attribute(symver) && !_GLIBCXX_INLINE_VERSION > > +# define SYMVER(sym) __attribute__((symver(#sym "@@GLIBCXX_3.4.31"))) > > +#else > > +# define SYMVER(sym) > > +#endif > > Is there anything that prevents these symbol versions getting added for > libstdc++.a? I think that could be problematic because a custom DSO > typically will not have a version node for GLIBCXX_3.4.31. Can we make everything hidden in libstdc++.a? If somebody builds a DSO with -static-libstdc++ then he very likely doesn't want to export libstdc++ symbols?