On Tue, 18 Apr 2023 at 17:13, Jonathan Wakely wrote: > > On Tue, 18 Apr 2023 at 16:59, Jonathan Wakely via Libstdc++ > wrote: > > diff --git a/libstdc++-v3/config/abi/pre/gnu.ver b/libstdc++-v3/config/abi/pre/gnu.ver > > index 4ae63094eb7..7c015524b62 100644 > > --- a/libstdc++-v3/config/abi/pre/gnu.ver > > +++ b/libstdc++-v3/config/abi/pre/gnu.ver > > @@ -2512,6 +2512,20 @@ GLIBCXX_3.4.31 { > > _ZNKSt12__shared_ptrINSt10filesystem28recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE[012]EEcvbEv; > > _ZNKSt12__shared_ptrINSt10filesystem7__cxx1128recursive_directory_iterator10_Dir_stackELN9__gnu_cxx12_Lock_policyE[012]EEcvbEv; > > > > +#if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ > > + && defined(_GLIBCXX_HAVE_AS_SYMVER_DIRECTIVE) \ > > + && defined(_GLIBCXX_HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) > > I've just noticed that these will never be defined, because this > linker script is preprocessed with config.h not c++config.h, and so it > should be: > > #if defined(_GLIBCXX_SYMVER_GNU) && defined(_GLIBCXX_SHARED) \ > && defined(HAVE_AS_SYMVER_DIRECTIVE) \ > && defined(HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT) > > > The condition will never be true as currently written (which doesn't > actually seem to matter, but Jakub says that re-exporting the symbols > as the new version is needed in the linker script for older linkers). Fixed with this patch, pushed to trunk and gcc-13 (after Jakub's approval). Tested x86_64-linux and sparc-solaris2.11