https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99453
--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #0) > This will use the last matching file for the libstdc++* glob. That works > fine for ELF targets where the matching names are: > > libstdc++.a > libstdc++.so > libstdc++.so.6 > libstdc++.so.6.0.29 > > But not for MacOS with: > > libstdc++.6.dylib > libstdc++.a > > Or mingw with: > > libstdc++-6.dll > libstdc++.dll.a > > We need a better way to find the dynamic library, whether that's the > so.6.0.29 or the .dylib or the .dll, that doesn't depend on the shell's > alphabetic sort for the pattern. As the comment says, libtool doesn't give > us that info, but we can still do better. Hmm, this isn't fixed for mingw because the libtool libstdc++.la file has: # The name that we can dlopen(3). dlname='libstdc++-6.dll' # Names of this library. library_names='libstdc++.dll.a' # The name of the static archive. old_library='libstdc++.a' This means we still choose libstdc++.dll.a-gdb.py as the hook name, which is still wrong. Yay for libtool.