When no shared library is installed, the new code to determine the name of the -gdb.py file yields an empty string. Use the name of the static library in that case. libstdc++-v3/ChangeLog: PR libstdc++/99453 * python/Makefile.am: Use archive name for printer hook if no dynamic library name is available. * python/Makefile.in: Regenerate. Tested x86_64-linux. Committed to trunk. This is needed for gcc-11 too.