gcc/libstdc++-v3/python
Philippe Blain c2fc1702cb libstdc++: Install libstdc++*-gdb.py more robustly [PR 99453]
In order for GDB to auto-load the pretty printers, they must be installed
as "libstdc++.$ext-gdb.py", where 'libstdc++.$ext' is the name of the
object file that is loaded by GDB [1], i.e. the libstdc++ shared library.

The approach taken in libstdc++-v3/python/Makefile.am is to loop over
files matching 'libstdc++*' in $(DESTDIR)$(toolexeclibdir) and choose
the last file matching that glob that is not a symlink, the Libtool
'*.la' file or a Python file.

That works fine for ELF targets where the matching names are:

  libstdc++.a
  libstdc++.so
  libstdc++.so.6
  libstdc++.so.6.0.29

But not for macOS with:

  libstdc++.6.dylib
  libstdc++.a

Or MinGW with:

  libstdc++-6.dll
  libstdc++.dll.a

Try to make a better job at installing the pretty printers with the
correct name by copying the approach taken by isl [2], that is, using
a sed invocation on the Libtool-generated 'libstdc++.la' to read the
correct name for the current platform.

[1] https://sourceware.org/gdb/onlinedocs/gdb/objfile_002dgdbdotext-file.html
[2] https://repo.or.cz/isl.git/blob/HEAD:/Makefile.am#l611

libstdc++-v3/ChangeLog:

	PR libstdc++/99453
	* python/Makefile.am: Install libstdc++*-gdb.py more robustly.
	* python/Makefile.in: Regenerate.

Co-authored-by: Jonathan Wakely <jwakely@redhat.com>
2021-04-21 16:55:15 +01:00
..
libstdcxx libstdc++: Fix find_type helper to work consistently 2021-03-11 17:52:56 +00:00
hook.in Update copyright years. 2021-01-04 10:26:59 +01:00
Makefile.am libstdc++: Install libstdc++*-gdb.py more robustly [PR 99453] 2021-04-21 16:55:15 +01:00
Makefile.in libstdc++: Install libstdc++*-gdb.py more robustly [PR 99453] 2021-04-21 16:55:15 +01:00