aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2021-06-01 11:00:16 +0100
committerJonathan Wakely <jwakely@redhat.com>2021-06-01 13:29:34 +0100
commit9f7bc160b4a0f27dce248d1226e3ae7104b0e67b (patch)
tree55ae185dbe039ab39e9828ff4e65409b16f26d6a
parentfdbd0cb73af527f0630f0cbb26edb8584f593fea (diff)
downloadgcc-9f7bc160b4a0f27dce248d1226e3ae7104b0e67b.zip
gcc-9f7bc160b4a0f27dce248d1226e3ae7104b0e67b.tar.gz
gcc-9f7bc160b4a0f27dce248d1226e3ae7104b0e67b.tar.bz2
libstdc++: Fix installation of python hooks [PR 99453]
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.
-rw-r--r--libstdc++-v3/python/Makefile.am4
-rw-r--r--libstdc++-v3/python/Makefile.in4
2 files changed, 8 insertions, 0 deletions
diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am
index 0c2b207..8efefa5 100644
--- a/libstdc++-v3/python/Makefile.am
+++ b/libstdc++-v3/python/Makefile.am
@@ -48,5 +48,9 @@ install-data-local: gdb.py
## the correct name.
@libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
$(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
+ if [ -z "$$libname" ]; then \
+ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
+ fi; \
echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py
diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in
index 2efe0b9..9904a91 100644
--- a/libstdc++-v3/python/Makefile.in
+++ b/libstdc++-v3/python/Makefile.in
@@ -609,6 +609,10 @@ install-data-local: gdb.py
@$(mkdir_p) $(DESTDIR)$(toolexeclibdir)
@libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
$(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
+ if [ -z "$$libname" ]; then \
+ libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \
+ $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \
+ fi; \
echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \
$(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py