Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame^] | 1 | Upstream-Status: Backport |
| 2 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
| 3 | |
| 4 | From ad4c21f0f59b52357019148ec94d767aa2acd8f2 Mon Sep 17 00:00:00 2001 |
| 5 | From: Jonathan Wakely <jwakely@redhat.com> |
| 6 | Date: Tue, 1 Jun 2021 11:00:16 +0100 |
| 7 | Subject: [PATCH] libstdc++: Fix installation of python hooks [PR 99453] |
| 8 | |
| 9 | When no shared library is installed, the new code to determine the name |
| 10 | of the -gdb.py file yields an empty string. Use the name of the static |
| 11 | library in that case. |
| 12 | |
| 13 | libstdc++-v3/ChangeLog: |
| 14 | |
| 15 | PR libstdc++/99453 |
| 16 | * python/Makefile.am: Use archive name for printer hook if no |
| 17 | dynamic library name is available. |
| 18 | * python/Makefile.in: Regenerate. |
| 19 | |
| 20 | (cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b) |
| 21 | --- |
| 22 | libstdc++-v3/python/Makefile.am | 4 ++++ |
| 23 | libstdc++-v3/python/Makefile.in | 4 ++++ |
| 24 | 2 files changed, 8 insertions(+) |
| 25 | |
| 26 | diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am |
| 27 | index 0c2b207b86e..8efefa5725c 100644 |
| 28 | --- a/libstdc++-v3/python/Makefile.am |
| 29 | +++ b/libstdc++-v3/python/Makefile.am |
| 30 | @@ -48,5 +48,9 @@ install-data-local: gdb.py |
| 31 | ## the correct name. |
| 32 | @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 33 | $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 34 | + if [ -z "$$libname" ]; then \ |
| 35 | + libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 36 | + $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 37 | + fi; \ |
| 38 | echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ |
| 39 | $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py |
| 40 | diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in |
| 41 | index 2efe0b96a19..9904a9197de 100644 |
| 42 | --- a/libstdc++-v3/python/Makefile.in |
| 43 | +++ b/libstdc++-v3/python/Makefile.in |
| 44 | @@ -609,6 +609,10 @@ install-data-local: gdb.py |
| 45 | @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) |
| 46 | @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 47 | $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 48 | + if [ -z "$$libname" ]; then \ |
| 49 | + libname=`sed -ne "/^old_library=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 50 | + $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 51 | + fi; \ |
| 52 | echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ |
| 53 | $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py |
| 54 | |
| 55 | -- |
| 56 | 2.25.1 |
| 57 | |