commit f3cff718df0cf7590ccf9bc1d8cd17e4e08f1e6d Author: Jonathan Wakely Date: Thu Apr 18 17:26:55 2024 libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp This completes the fixes to put all experimental symbols into libstdc++exp.a. On trunk the libstdc++_libbacktrace.a was removed completely and its contents aded to libstdc++exp.a instead. We don't want to remove it on the gcc-13 branch because that would break makefiles using it. We can add the contents to libstdc++exp.a and then install a symlink so that using -lstdc++_libbacktrace still works, but links to libstdc++exp.a instead. The libstdc++_libbacktrace.la libtool control file is removed by this change, because I'm pretty sure it's not actually useful, and I don't know whether it should be a symlink to libstdc++exp.la or a regular file that refers to libstdc++_libbacktrace.a. libstdc++-v3/ChangeLog: * src/experimental/Makefile.am (install-exec-local): New target. (uninstall-local): New target. * src/experimental/Makefile.in: Regenerate. * src/libbacktrace/Makefile.am: Build libstdc++_libbacktrace as noinst_LTLIBRARIES so it's only a convenience library. * src/libbacktrace/Makefile.in: Regenerate. diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am index c5a38d882c2..6536e759abd 100644 --- a/libstdc++-v3/src/experimental/Makefile.am +++ b/libstdc++-v3/src/experimental/Makefile.am @@ -66,6 +66,15 @@ AM_CXXFLAGS = \ AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" +if ENABLE_BACKTRACE +install-exec-local: + -cd '$(DESTDIR)$(toolexeclibdir)' && \ + $(LN_S) libstdc++exp.a libstdc++_libbacktrace.a +uninstall-local: + -cd '$(DESTDIR)$(toolexeclibdir)' && \ + rm -f libstdc++_libbacktrace.a +endif + # Libtool notes # 1) In general, libtool expects an argument such as `--tag=CXX' when diff --git a/libstdc++-v3/src/experimental/Makefile.in b/libstdc++-v3/src/experimental/Makefile.in index c16083a7fc8..238c96d9f9a 100644 --- a/libstdc++-v3/src/experimental/Makefile.in +++ b/libstdc++-v3/src/experimental/Makefile.in @@ -712,6 +712,8 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." +@ENABLE_BACKTRACE_FALSE@install-exec-local: +@ENABLE_BACKTRACE_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ @@ -740,7 +742,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-toolexeclibLTLIBRARIES +install-exec-am: install-exec-local install-toolexeclibLTLIBRARIES install-html: install-html-am @@ -779,7 +781,7 @@ ps: ps-am ps-am: -uninstall-am: uninstall-toolexeclibLTLIBRARIES +uninstall-am: uninstall-local uninstall-toolexeclibLTLIBRARIES .MAKE: install-am install-strip @@ -789,18 +791,25 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES distclean-libtool distclean-tags dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip install-toolexeclibLTLIBRARIES \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am \ - uninstall-toolexeclibLTLIBRARIES + install-exec-local install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip \ + install-toolexeclibLTLIBRARIES installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-local uninstall-toolexeclibLTLIBRARIES .PRECIOUS: Makefile +@ENABLE_BACKTRACE_TRUE@install-exec-local: +@ENABLE_BACKTRACE_TRUE@ -cd '$(DESTDIR)$(toolexeclibdir)' && \ +@ENABLE_BACKTRACE_TRUE@ $(LN_S) libstdc++exp.a libstdc++_libbacktrace.a +@ENABLE_BACKTRACE_TRUE@uninstall-local: +@ENABLE_BACKTRACE_TRUE@ -cd '$(DESTDIR)$(toolexeclibdir)' && \ +@ENABLE_BACKTRACE_TRUE@ rm -f libstdc++_libbacktrace.a + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am index 3992f3ab9c5..4a08f11da1e 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.am +++ b/libstdc++-v3/src/libbacktrace/Makefile.am @@ -31,7 +31,7 @@ include $(top_srcdir)/fragment.am -toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la +noinst_LTLIBRARIES = libstdc++_libbacktrace.la ACLOCAL_AMFLAGS = -I ../.. -I ../../config diff --git a/libstdc++-v3/src/libbacktrace/Makefile.in b/libstdc++-v3/src/libbacktrace/Makefile.in index f5f19149ae6..6b898f65b06 100644 --- a/libstdc++-v3/src/libbacktrace/Makefile.in +++ b/libstdc++-v3/src/libbacktrace/Makefile.in @@ -150,35 +150,7 @@ DIST_COMMON = $(srcdir)/Makefile.am CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = backtrace-supported.h CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(toolexeclibdir)" -LTLIBRARIES = $(toolexeclib_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) am_libstdc___libbacktrace_la_OBJECTS = $(obj_prefix)-atomic.lo \ $(obj_prefix)-backtrace.lo $(obj_prefix)-dwarf.lo \ $(obj_prefix)-fileline.lo $(obj_prefix)-posix.lo \ @@ -484,7 +456,7 @@ WARN_CXXFLAGS = \ # -I/-D flags to pass when compiling. AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) -toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la +noinst_LTLIBRARIES = libstdc++_libbacktrace.la ACLOCAL_AMFLAGS = -I ../.. -I ../../config # This will be used instead of the common AM_CPPFLAGS from fragment.am @@ -594,33 +566,9 @@ $(am__aclocal_m4_deps): backtrace-supported.h: $(top_builddir)/config.status $(srcdir)/backtrace-supported.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(toolexeclibdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(toolexeclibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(toolexeclibdir)"; \ - } - -uninstall-toolexeclibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(toolexeclibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(toolexeclibdir)/$$f"; \ - done - -clean-toolexeclibLTLIBRARIES: - -test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES) - @list='$(toolexeclib_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -630,7 +578,7 @@ clean-toolexeclibLTLIBRARIES: } libstdc++_libbacktrace.la: $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_DEPENDENCIES) $(EXTRA_libstdc___libbacktrace_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) -rpath $(toolexeclibdir) $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -756,9 +704,6 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: - for dir in "$(DESTDIR)$(toolexeclibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -791,7 +736,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -817,7 +762,7 @@ install-dvi: install-dvi-am install-dvi-am: -install-exec-am: install-toolexeclibLTLIBRARIES +install-exec-am: install-html: install-html-am @@ -856,24 +801,23 @@ ps: ps-am ps-am: -uninstall-am: uninstall-toolexeclibLTLIBRARIES +uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-toolexeclibLTLIBRARIES cscopelist-am ctags \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip install-toolexeclibLTLIBRARIES \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags tags-am uninstall uninstall-am \ - uninstall-toolexeclibLTLIBRARIES + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am .PRECIOUS: Makefile