William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1 | This change breaks installation on baremetal targets, so whilst the cause is |
| 2 | investigated revert the commit. |
| 3 | |
| 4 | Upstream-Status: Inappropriate |
| 5 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
| 6 | |
| 7 | From 8ec52bd0ba2141ef0bcc6f93e26a23d662b40f78 Mon Sep 17 00:00:00 2001 |
| 8 | From: Ross Burton <ross.burton@arm.com> |
| 9 | Date: Wed, 26 May 2021 19:54:29 +0100 |
| 10 | Subject: [PATCH] Revert "libstdc++: Install libstdc++*-gdb.py more robustly |
| 11 | [PR 99453]" |
| 12 | |
| 13 | This reverts commit dbb87d6a9c37c8eca80d77782717a8144515c16d. |
| 14 | --- |
| 15 | libstdc++-v3/python/Makefile.am | 20 ++++++++++++++++---- |
| 16 | libstdc++-v3/python/Makefile.in | 14 ++++++++++++-- |
| 17 | 2 files changed, 28 insertions(+), 6 deletions(-) |
| 18 | |
| 19 | diff --git a/libstdc++-v3/python/Makefile.am b/libstdc++-v3/python/Makefile.am |
| 20 | index 0c2b207b86e..01517a2a522 100644 |
| 21 | --- a/libstdc++-v3/python/Makefile.am |
| 22 | +++ b/libstdc++-v3/python/Makefile.am |
| 23 | @@ -44,9 +44,21 @@ gdb.py: hook.in Makefile |
| 24 | install-data-local: gdb.py |
| 25 | @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) |
| 26 | ## We want to install gdb.py as SOMETHING-gdb.py. SOMETHING is the |
| 27 | -## full name of the final library. We use the libtool .la file to get |
| 28 | -## the correct name. |
| 29 | - @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 30 | - $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 31 | +## full name of the final library. We want to ignore symlinks, the |
| 32 | +## .la file, and any previous -gdb.py file. This is inherently |
| 33 | +## fragile, but there does not seem to be a better option, because |
| 34 | +## libtool hides the real names from us. |
| 35 | + @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \ |
| 36 | + for file in libstdc++.*; do \ |
| 37 | + case $$file in \ |
| 38 | + *-gdb.py) ;; \ |
| 39 | + *.la) ;; \ |
| 40 | + *) if test -h $$file; then \ |
| 41 | + continue; \ |
| 42 | + fi; \ |
| 43 | + libname=$$file;; \ |
| 44 | + esac; \ |
| 45 | + done; \ |
| 46 | + cd $$here; \ |
| 47 | echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ |
| 48 | $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py |
| 49 | diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in |
| 50 | index 2efe0b96a19..c35dbe55961 100644 |
| 51 | --- a/libstdc++-v3/python/Makefile.in |
| 52 | +++ b/libstdc++-v3/python/Makefile.in |
| 53 | @@ -607,8 +607,18 @@ gdb.py: hook.in Makefile |
| 54 | |
| 55 | install-data-local: gdb.py |
| 56 | @$(mkdir_p) $(DESTDIR)$(toolexeclibdir) |
| 57 | - @libname=`sed -ne "/^library_names=/{s/.*='//;s/'$$//;s/ .*//;p;}" \ |
| 58 | - $(DESTDIR)$(toolexeclibdir)/libstdc++.la`; \ |
| 59 | + @here=`pwd`; cd $(DESTDIR)$(toolexeclibdir); \ |
| 60 | + for file in libstdc++.*; do \ |
| 61 | + case $$file in \ |
| 62 | + *-gdb.py) ;; \ |
| 63 | + *.la) ;; \ |
| 64 | + *) if test -h $$file; then \ |
| 65 | + continue; \ |
| 66 | + fi; \ |
| 67 | + libname=$$file;; \ |
| 68 | + esac; \ |
| 69 | + done; \ |
| 70 | + cd $$here; \ |
| 71 | echo " $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py"; \ |
| 72 | $(INSTALL_DATA) gdb.py $(DESTDIR)$(toolexeclibdir)/$$libname-gdb.py |
| 73 | |
| 74 | -- |
| 75 | 2.25.1 |
| 76 | |