From patchwork Thu Apr 18 17:29:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 88678 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1800E384AB55 for ; Thu, 18 Apr 2024 19:51:52 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 853543858401 for ; Thu, 18 Apr 2024 19:51:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 853543858401 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 853543858401 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713469876; cv=none; b=WtDBP/eGLag0YNX7LxjR3XLL19Ke+zp1iB0Mqcy/TWvBEEAeNQ4qCgFbmXeUhV3SFtg4MuO8o3bHMua2iuVCqg4SLhLAwXTSSV62LVi8DzslCWtq/yMfVo7lBIzwpuTaYRqeomHX48Lrqk6zVVcgewsdnjgaq42ijShGk/hhja0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713469876; c=relaxed/simple; bh=lAGkK5Sg+SJnOumuDjHA1F9SuS6e4Dghk9lX6gkNM8Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=qob3/2FOA8WZRZxvR8exC2zswsmRK/pZB0VXJj09dJyIpKnn59tDq/psOUkJffD9f1AF5p51wuHF10p0yeu8A1T6DiFEtbK7184i+koXA6CWP3sOzjsUqIziqRDjLvVafx8idLbqmgjSe531iSgdrHm4wcdH72bAfXJtr/8VEBE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713469874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8CWU6LO2MsqLdXW2rARdpUBhfdg4VChsmmWLQeRbcpU=; b=DzK4s1Ro+uoVP2PBJ8mFAd39v620YMKVrJ7auFIC1MHk7ySPkBYe0l7Oy5GBvNSPWtMAT9 gg0McpAmY8mq+SOww2GW1/itbSVJJ8bWyWmyJdTOkeJUaMbvVThUEpjuCz2fBsuvsfm5dy yjO6GdxFSGlQpjJStmdxlxXMHBqAON4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-137-3pNwy8RBMz2UAmmmUgCi9Q-1; Thu, 18 Apr 2024 15:51:10 -0400 X-MC-Unique: 3pNwy8RBMz2UAmmmUgCi9Q-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 993191049C97; Thu, 18 Apr 2024 19:51:09 +0000 (UTC) Received: from localhost (unknown [10.42.28.238]) by smtp.corp.redhat.com (Postfix) with ESMTP id 350E8203397E; Thu, 18 Apr 2024 19:51:09 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp Date: Thu, 18 Apr 2024 18:29:42 +0100 Message-ID: <20240418195107.1281808-3-jwakely@redhat.com> In-Reply-To: <20240418195107.1281808-1-jwakely@redhat.com> References: <20240418195107.1281808-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org 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 do that on the gcc-13 branch because it will break makefiles using it. We can add the contents to libstdc++exp.a and then install a symlink so that -lstdc++_libbacktrace still works, but links to libstdc++exp.a instead. libstdc++-v3/ChangeLog: * src/experimental/Makefile.am (install-exec-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. --- libstdc++-v3/src/experimental/Makefile.am | 5 ++ libstdc++-v3/src/experimental/Makefile.in | 23 +++--- libstdc++-v3/src/libbacktrace/Makefile.am | 2 +- libstdc++-v3/src/libbacktrace/Makefile.in | 86 ++++------------------- 4 files changed, 35 insertions(+), 81 deletions(-) diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am index c5a38d882c2..6cdcdf3525d 100644 --- a/libstdc++-v3/src/experimental/Makefile.am +++ b/libstdc++-v3/src/experimental/Makefile.am @@ -66,6 +66,11 @@ AM_CXXFLAGS = \ AM_MAKEFLAGS = \ "gxx_include_dir=$(gxx_include_dir)" +install-exec-local: + -cd '$(DESTDIR)$(toolexeclibdir)' && \ + $(LN_S) libstdc++exp.la libstdc++_libbacktrace.la && \ + $(LN_S) libstdc++exp.a libstdc++_libbacktrace.a + # 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..87e52c1c83f 100644 --- a/libstdc++-v3/src/experimental/Makefile.in +++ b/libstdc++-v3/src/experimental/Makefile.in @@ -740,7 +740,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 @@ -789,18 +789,23 @@ 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-toolexeclibLTLIBRARIES .PRECIOUS: Makefile +install-exec-local: + -cd '$(DESTDIR)$(toolexeclibdir)' && \ + $(LN_S) libstdc++exp.la libstdc++_libbacktrace.la && \ + $(LN_S) libstdc++exp.a 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