From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 7A318398CC25; Thu, 3 Jun 2021 14:57:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A318398CC25 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r10-9885] libstdc++: Fix installation of python hooks [PR 99453] X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/releases/gcc-10 X-Git-Oldrev: 5b4b18b892278380cdb303c097466009914b828e X-Git-Newrev: a937d0269c1202326a74965329159d90f176438a Message-Id: <20210603145749.7A318398CC25@sourceware.org> Date: Thu, 3 Jun 2021 14:57:49 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2021 14:57:49 -0000 https://gcc.gnu.org/g:a937d0269c1202326a74965329159d90f176438a commit r10-9885-ga937d0269c1202326a74965329159d90f176438a Author: Jonathan Wakely Date: Tue Jun 1 11:00:16 2021 +0100 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. (cherry picked from commit 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b) Diff: --- libstdc++-v3/python/Makefile.am | 4 ++++ libstdc++-v3/python/Makefile.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am index 3b7c77c8659..32fc2e4c88b 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 91395ee9d57..7200a761457 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -604,6 +604,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