https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67903
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- To me it looks like the issue is that when statically linking libstdc++ into a shared library you export the symbols of that libstdc++ copy and thus they participate in merging. So my suggestion is that you use a version script (for example) to only export symbols from your shared library and not libstdc++.