From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 742A93858D20 for ; Thu, 25 Apr 2024 16:23:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 742A93858D20 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 742A93858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714062209; cv=none; b=X5oCtPRu3QZOZRrld0yPv/LFZb43c6Tipgvd2Dk9sYmLBYgucDTUM4bUKUMq9QPPw/kkPZjgkfV5r6jcyIugwS3kjJM4eLYhGSNz1hPUKw9OURDt3uXbY+YIvdhuT6UOxDSaZs8rR/in7S3dMJkJCNAuS14GucS1LDCT/1/RfHI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714062209; c=relaxed/simple; bh=B5PWF5oGaXXQbbS3d1KaPHPQQUFlP2bD5Pf+ZmZgzGE=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=GcYjwnYw6Sx/Gvm25gtTHtWihd87L859QU0bG+qcfPASD2l6osmXIhjaMIJHLPd6RPwl92ooR5MsCnLBaGBHxXYluRSPnMJYj8s3tsmxG2o45fkffZKCi8alyO9POThd2bSg7d2A50+qqMkhnD31JTUrprmG/n7hymmHatVKl1Y= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714062207; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=aW9Bz5sGPE1t8pjnZOG6uX5Pevg1J3el+9wlJ4U77Ag=; b=WNW9vaFnZsb+taRA+lBC/WQZqDSgT0ehOrOuAr5Uw5h/1/D1pIocBuyvsqT/njrgyQDeXZ KrNIAuYAteaOHjb/Dvp3xXSWWj1A+SU9Se+CDqbf7z3EA2+dMyE2ahLshFIaoL7+VHsDZP HnnqRGvGadH65jSp80vjvwdc59KX5Fo= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-422-dFQapykkODSQ4zabOFBZqg-1; Thu, 25 Apr 2024 12:23:25 -0400 X-MC-Unique: dFQapykkODSQ4zabOFBZqg-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-615073c8dfbso20293677b3.1 for ; Thu, 25 Apr 2024 09:23:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714062205; x=1714667005; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aW9Bz5sGPE1t8pjnZOG6uX5Pevg1J3el+9wlJ4U77Ag=; b=Ggc43Sw1/CddqIDXNHrm3z9g1ZNFyfoKosCctHB9yD+DkFM/uM7cLDABVZ8gfDmLs0 gPqFZlROb97kRNjbtl7kmuSqekr0MXGY/CHBvi0M6jT0oHTneXV8a5YdxImAGz9jHVkE Zl2xwEqCczGIAT0SHW5MYaln3qugKDrEameVqnFgI8Rh7Ui04pj1c6ajJqOYlBKdivwN j+00XmrYacX9IVgdmJ03t+uM/iDj0J0vJAAdzXEhT3LNRZnvR7M/LSwD645i7qXIn2zH n6P24FV65relw+5xObU3jQOjukW2jK3tc79f/Gcm0OX6HxRK3Cwguf6HkUPgQlv+1kR5 KzNw== X-Forwarded-Encrypted: i=1; AJvYcCX7UhE/XH1PPvUDeZ6aBLyJVpXtJJ1UiD/OcAReiQCZjFB1haoJcnaF4oftLE7KFVwhJApHsthWVPJawlNFXgZ7eKxBK3BTig== X-Gm-Message-State: AOJu0YyLuSYWaLbuBlyeE2diKS4PKATSdFWFCyJVh+3Y0HCIgMnKW4u2 gIAw7qXiXSQ0UBvq9LXAsJHNdvRnFSyfo8aaIIdxr2a7d5hmi2pZpmDouR2QO8lHRLw/B++tSs8 a/OGBfwcvdY3FAe9xlFDvn7gLWXNlInyqh8s6GSwM+06onyWokyvqXSmLaoo9ivD0DzUmm2ugCM Gs+57iQA3m6i1owTM1eRrBVHG+MFwJjw== X-Received: by 2002:a25:870b:0:b0:dbd:be40:2191 with SMTP id a11-20020a25870b000000b00dbdbe402191mr110207ybl.42.1714062204996; Thu, 25 Apr 2024 09:23:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFnZqZgSoYlSItGvZxBkFxI+Duc7nNE5HX2Cz2rqumOIkh8le9D+KhTEo6ntT8DR7GDbgPsgIl9zlE8RD11Q/o= X-Received: by 2002:a25:870b:0:b0:dbd:be40:2191 with SMTP id a11-20020a25870b000000b00dbdbe402191mr110188ybl.42.1714062204683; Thu, 25 Apr 2024 09:23:24 -0700 (PDT) MIME-Version: 1.0 References: <20240418195107.1281808-1-jwakely@redhat.com> <20240418195107.1281808-2-jwakely@redhat.com> In-Reply-To: <20240418195107.1281808-2-jwakely@redhat.com> From: Jonathan Wakely Date: Thu, 25 Apr 2024 17:23:08 +0100 Message-ID: Subject: Re: [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-12.7 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=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Pushed to gcc-13 On Thu, 18 Apr 2024 at 20:51, Jonathan Wakely wrote: > > In r14-3812-gb96b554592c5cb I claimed that libstdc++exp.a now contains > all the symbols from libstdc++fs.a as well as libstdc++_libbacktrace.a, > but that wasn't true. Only the symbols from the latter were added to > libstdc++exp.a, the Filesystem TS ones weren't. This seems to be because > libtool won't combine static libs that are going to be installed > separately. Because libstdc++fs.a is still installed, libtool decides it > shouldn't be included in libstdc++exp.a. > > The solution is similar to what we already do for libsupc++.a: build two > static libs, libstdc++fs.a and libstdc++fsconvenience.a, where the > former is installed and the latter isn't. If we then tell libtool to > include the latter in libstdc++exp.a it will do as it's told. > > libstdc++-v3/ChangeLog: > > * src/experimental/Makefile.am: Use libstdc++fsconvenience.a > instead of libstdc++fs.a. > * src/experimental/Makefile.in: Regenerate. > * src/filesystem/Makefile.am: Build libstdc++fsconvenience.a as > well. > * src/filesystem/Makefile.in: Regenerate. > > (cherry picked from commit abf40d2953639534af3428424f467adf3cb52177) > --- > libstdc++-v3/src/experimental/Makefile.am | 2 +- > libstdc++-v3/src/experimental/Makefile.in | 4 +-- > libstdc++-v3/src/filesystem/Makefile.am | 4 +++ > libstdc++-v3/src/filesystem/Makefile.in | 37 +++++++++++++++++++---- > 4 files changed, 38 insertions(+), 9 deletions(-) > > diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am > index 1c7cea7e846..c5a38d882c2 100644 > --- a/libstdc++-v3/src/experimental/Makefile.am > +++ b/libstdc++-v3/src/experimental/Makefile.am > @@ -25,7 +25,7 @@ include $(top_srcdir)/fragment.am > toolexeclib_LTLIBRARIES = libstdc++exp.la > > if ENABLE_FILESYSTEM_TS > -filesystem_lib = $(top_builddir)/src/filesystem/libstdc++fs.la > +filesystem_lib = $(top_builddir)/src/filesystem/libstdc++fsconvenience.la > else > filesystem_lib = > endif > diff --git a/libstdc++-v3/src/experimental/Makefile.in b/libstdc++-v3/src/experimental/Makefile.in > index 6f6b742c1cf..c16083a7fc8 100644 > --- a/libstdc++-v3/src/experimental/Makefile.in > +++ b/libstdc++-v3/src/experimental/Makefile.in > @@ -148,7 +148,7 @@ am__uninstall_files_from_dir = { \ > } > am__installdirs = "$(DESTDIR)$(toolexeclibdir)" > LTLIBRARIES = $(toolexeclib_LTLIBRARIES) > -@ENABLE_FILESYSTEM_TS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/filesystem/libstdc++fs.la > +@ENABLE_FILESYSTEM_TS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/filesystem/libstdc++fsconvenience.la > @ENABLE_BACKTRACE_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la > am__objects_1 = contract.lo > am_libstdc__exp_la_OBJECTS = $(am__objects_1) > @@ -450,7 +450,7 @@ WARN_CXXFLAGS = \ > AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) > toolexeclib_LTLIBRARIES = libstdc++exp.la > @ENABLE_FILESYSTEM_TS_FALSE@filesystem_lib = > -@ENABLE_FILESYSTEM_TS_TRUE@filesystem_lib = $(top_builddir)/src/filesystem/libstdc++fs.la > +@ENABLE_FILESYSTEM_TS_TRUE@filesystem_lib = $(top_builddir)/src/filesystem/libstdc++fsconvenience.la > @ENABLE_BACKTRACE_FALSE@backtrace_lib = > @ENABLE_BACKTRACE_TRUE@backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la > headers = > diff --git a/libstdc++-v3/src/filesystem/Makefile.am b/libstdc++-v3/src/filesystem/Makefile.am > index d2e1fde3f13..55f309b5c15 100644 > --- a/libstdc++-v3/src/filesystem/Makefile.am > +++ b/libstdc++-v3/src/filesystem/Makefile.am > @@ -22,7 +22,10 @@ > > include $(top_srcdir)/fragment.am > > +# Separate libstdc++fs.a to be installed. > toolexeclib_LTLIBRARIES = libstdc++fs.la > +# Duplicate lib that is to be part of libstdc++exp.a > +noinst_LTLIBRARIES = libstdc++fsconvenience.la > > headers = > > @@ -44,6 +47,7 @@ sources = \ > # vpath % $(top_srcdir)/src/filesystem > > libstdc__fs_la_SOURCES = $(sources) > +libstdc__fsconvenience_la_SOURCES = $(sources) > > # AM_CXXFLAGS needs to be in each subdirectory so that it can be > # modified in a per-library or per-sub-library way. Need to manually > diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in > index 852390ec1a9..76ba905087b 100644 > --- a/libstdc++-v3/src/filesystem/Makefile.in > +++ b/libstdc++-v3/src/filesystem/Makefile.in > @@ -147,7 +147,7 @@ am__uninstall_files_from_dir = { \ > $(am__cd) "$$dir" && rm -f $$files; }; \ > } > am__installdirs = "$(DESTDIR)$(toolexeclibdir)" > -LTLIBRARIES = $(toolexeclib_LTLIBRARIES) > +LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES) > libstdc__fs_la_LIBADD = > @ENABLE_DUAL_ABI_TRUE@am__objects_1 = cow-dir.lo cow-ops.lo \ > @ENABLE_DUAL_ABI_TRUE@ cow-path.lo > @@ -158,6 +158,10 @@ AM_V_lt = $(am__v_lt_@AM_V@) > am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) > am__v_lt_0 = --silent > am__v_lt_1 = > +libstdc__fsconvenience_la_LIBADD = > +am_libstdc__fsconvenience_la_OBJECTS = $(am__objects_2) > +libstdc__fsconvenience_la_OBJECTS = \ > + $(am_libstdc__fsconvenience_la_OBJECTS) > AM_V_P = $(am__v_P_@AM_V@) > am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) > am__v_P_0 = false > @@ -184,7 +188,8 @@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) > am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) > am__v_CXXLD_0 = @echo " CXXLD " $@; > am__v_CXXLD_1 = > -SOURCES = $(libstdc__fs_la_SOURCES) > +SOURCES = $(libstdc__fs_la_SOURCES) \ > + $(libstdc__fsconvenience_la_SOURCES) > am__can_run_installinfo = \ > case $$AM_UPDATE_INFO_DIR in \ > n|no|NO) false;; \ > @@ -449,7 +454,11 @@ WARN_CXXFLAGS = \ > > # -I/-D flags to pass when compiling. > AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) > + > +# Separate libstdc++fs.a to be installed. > toolexeclib_LTLIBRARIES = libstdc++fs.la > +# Duplicate lib that is to be part of libstdc++exp.a > +noinst_LTLIBRARIES = libstdc++fsconvenience.la > headers = > @ENABLE_DUAL_ABI_FALSE@cxx11_abi_sources = > @ENABLE_DUAL_ABI_TRUE@cxx11_abi_sources = \ > @@ -466,6 +475,7 @@ sources = \ > > # vpath % $(top_srcdir)/src/filesystem > libstdc__fs_la_SOURCES = $(sources) > +libstdc__fsconvenience_la_SOURCES = $(sources) > > # AM_CXXFLAGS needs to be in each subdirectory so that it can be > # modified in a per-library or per-sub-library way. Need to manually > @@ -565,6 +575,17 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) > cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh > $(am__aclocal_m4_deps): > > +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`; \ > + test -z "$$locs" || { \ > + echo rm -f $${locs}; \ > + rm -f $${locs}; \ > + } > + > install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES) > @$(NORMAL_INSTALL) > @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \ > @@ -603,6 +624,9 @@ clean-toolexeclibLTLIBRARIES: > libstdc++fs.la: $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_DEPENDENCIES) $(EXTRA_libstdc__fs_la_DEPENDENCIES) > $(AM_V_CXXLD)$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc__fs_la_OBJECTS) $(libstdc__fs_la_LIBADD) $(LIBS) > > +libstdc++fsconvenience.la: $(libstdc__fsconvenience_la_OBJECTS) $(libstdc__fsconvenience_la_DEPENDENCIES) $(EXTRA_libstdc__fsconvenience_la_DEPENDENCIES) > + $(AM_V_CXXLD)$(CXXLINK) $(libstdc__fsconvenience_la_OBJECTS) $(libstdc__fsconvenience_la_LIBADD) $(LIBS) > + > mostlyclean-compile: > -rm -f *.$(OBJEXT) > > @@ -715,8 +739,8 @@ 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 \ > - mostlyclean-am > +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ > + clean-toolexeclibLTLIBRARIES mostlyclean-am > > distclean: distclean-am > -rm -f Makefile > @@ -785,8 +809,9 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES > .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 \ > - ctags-am distclean distclean-compile distclean-generic \ > + clean-libtool clean-noinstLTLIBRARIES \ > + clean-toolexeclibLTLIBRARIES 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 \ > -- > 2.44.0 >