* [gcc-13 PATCH 0/2] Replace libstdc++_libbacktrace.a with libstdc++exp.a
@ 2024-04-18 17:29 Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp Jonathan Wakely
0 siblings, 2 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-18 17:29 UTC (permalink / raw)
To: libstdc++, gcc-patches
The first patch is a backport from trunk to fix the fact that I messed
up the change to add all symbols from libstdc++fs.a into libstdc++exp.a,
which was backported as r13-8207-g17acf9fbeb10d7. The change builds
libstdc++fs.a twice, once to install it and once as a convenience
library to be included into libstdc++exp.a. That change already works
fine on trunk, so should be fine on gcc-13 too.
The second patch is not a backport but is needed for the branch to
ensure that libstdc++exp.a also provides the symbols for
libstdc++_libbacktrace.a but without removing libstdc++_libbacktrace.a
itself. On trunk I removed it and put all its symbols in libstdc++exp.a,
but on the branch we don't want to stop installing that static lib
halfway through the gcc-13 release series, as it will break makefiles
that are using -lstdc++_libbacktrace to get those symbols.
Because libstdc++-v3/src/libbacktrace/Makefile.am is more complicated
than libstdc++-v3/src/filesystem/Makefile.am and because I don't know
what all the _LIBADD etc. variables do, I'm not sure exactly how to do
the "build it twice, once for installation and once as a convenience
library" thing. So instead what this patch does is change it to a
convenience library (as is done on trunk) but then also create a symlink
with the old installed name, pointing to libstdc++exp.a, so that
using -lstdc++_libbacktrace still works. The symlink is created using
$(LN_S) so for targets that don't support symlinks it's just a copy.
One gotcha is that if you do 'make install' over a pre-existing gcc-13
installation, the new symlinks for libstdc++_libbacktrace.{a,la} won't
be created, because there are already real files with those names. That
won't affect users installing gcc-13.3.0 afresh, it would only affect
people who've been building 13.2.1 from git or from snapshots. Apart
from some errors printed to stderr (and ignored by make) it won't really
matter, because the existing regular files provide the same symbols
anyway.
Does this look reasonable, and done correctly?
Or should I bite the bullet and figure out how to properly adjust
src/libbacktrace/Makefile.am to create an installable library and a
convenience library in parallel? Would I need to copy every
libstdc___libbacktrace_la_FOO variable to create a corresponding
libstdc___libbacktraceconvenience_la_FOO variable?
One advantage of the symlink approach is that we don't increase the
installed footprint of gcc-13 by duplicating all the backtrace symbols
in two static archives. We could even consider making libstdc++fs.a a
symlink to libstdc++exp.a as well, on trunk and gcc-13, to stop
duplicating those symbols.
-- >8 --
Jonathan Wakely (2):
libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS
symbols
libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp
libstdc++-v3/src/experimental/Makefile.am | 7 +-
libstdc++-v3/src/experimental/Makefile.in | 27 ++++---
libstdc++-v3/src/filesystem/Makefile.am | 4 ++
libstdc++-v3/src/filesystem/Makefile.in | 37 ++++++++--
libstdc++-v3/src/libbacktrace/Makefile.am | 2 +-
libstdc++-v3/src/libbacktrace/Makefile.in | 86 ++++-------------------
6 files changed, 73 insertions(+), 90 deletions(-)
--
2.44.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols
2024-04-18 17:29 [gcc-13 PATCH 0/2] Replace libstdc++_libbacktrace.a with libstdc++exp.a Jonathan Wakely
@ 2024-04-18 17:29 ` Jonathan Wakely
2024-04-25 16:23 ` Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp Jonathan Wakely
1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-18 17:29 UTC (permalink / raw)
To: libstdc++, gcc-patches
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp
2024-04-18 17:29 [gcc-13 PATCH 0/2] Replace libstdc++_libbacktrace.a with libstdc++exp.a Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols Jonathan Wakely
@ 2024-04-18 17:29 ` Jonathan Wakely
2024-04-18 20:34 ` Jonathan Wakely
1 sibling, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-18 17:29 UTC (permalink / raw)
To: libstdc++, gcc-patches
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
--
2.44.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp
2024-04-18 17:29 ` [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp Jonathan Wakely
@ 2024-04-18 20:34 ` Jonathan Wakely
2024-04-25 17:58 ` [gcc-13 PATCH 2/2 v3] " Jonathan Wakely
0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-18 20:34 UTC (permalink / raw)
To: libstdc++, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1086 bytes --]
On Thu, 18 Apr 2024 at 20:51, Jonathan Wakely wrote:
>
> 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.
It looks like simply duplicating all the libstdc___libbacktrace_FOO
variables in libbacktrace/Makefile.am does work (see attached patch),
so that we get an installed libstdc++_libbacktrace.a and a
not-installed libstdc++_libbacktraceconvenience.a which gets included
into the installed libstdc++exp.a
So if that's preferable to making the installed
libstdc++_libbacktrace.a a symlink, we can do that.
I still kinda like the symlink approach, because it reduces the size
on disk, and the same approach could be used to get rid of
libstdc++fs.a without breaking makefiles using -lstdc++fs
[-- Attachment #2: libbacktrace.patch --]
[-- Type: text/x-patch, Size: 14847 bytes --]
diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am
index 6cdcdf3525d..db6f3321f90 100644
--- a/libstdc++-v3/src/experimental/Makefile.am
+++ b/libstdc++-v3/src/experimental/Makefile.am
@@ -31,7 +31,7 @@ filesystem_lib =
endif
if ENABLE_BACKTRACE
-backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la
+backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktraceconvenience.la
else
backtrace_lib =
endif
diff --git a/libstdc++-v3/src/experimental/Makefile.in b/libstdc++-v3/src/experimental/Makefile.in
index 87e52c1c83f..709cc227a1f 100644
--- a/libstdc++-v3/src/experimental/Makefile.in
+++ b/libstdc++-v3/src/experimental/Makefile.in
@@ -149,7 +149,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++fsconvenience.la
-@ENABLE_BACKTRACE_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la
+@ENABLE_BACKTRACE_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/src/libbacktrace/libstdc++_libbacktraceconvenience.la
am__objects_1 = contract.lo
am_libstdc__exp_la_OBJECTS = $(am__objects_1)
libstdc__exp_la_OBJECTS = $(am_libstdc__exp_la_OBJECTS)
@@ -452,7 +452,7 @@ toolexeclib_LTLIBRARIES = libstdc++exp.la
@ENABLE_FILESYSTEM_TS_FALSE@filesystem_lib =
@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
+@ENABLE_BACKTRACE_TRUE@backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktraceconvenience.la
headers =
sources = \
contract.cc
diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am
index 4a08f11da1e..d45d60c8f69 100644
--- a/libstdc++-v3/src/libbacktrace/Makefile.am
+++ b/libstdc++-v3/src/libbacktrace/Makefile.am
@@ -31,18 +31,21 @@
include $(top_srcdir)/fragment.am
-noinst_LTLIBRARIES = libstdc++_libbacktrace.la
+toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la
+noinst_LTLIBRARIES = libstdc++_libbacktraceconvenience.la
ACLOCAL_AMFLAGS = -I ../.. -I ../../config
# This will be used instead of the common AM_CPPFLAGS from fragment.am
-libstdc___libbacktrace_la_CPPFLAGS = \
+bt_cppflags = \
-I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../../../libgcc -I .. -I $(top_srcdir) \
-I $(top_srcdir)/../libbacktrace \
-I $(top_srcdir)/../libiberty \
-include $(top_srcdir)/src/libbacktrace/backtrace-rename.h \
$(BACKTRACE_CPPFLAGS)
+libstdc___libbacktrace_la_CPPFLAGS = $(bt_cppflags)
+libstdc___libbacktraceconvenience_la_CPPFLAGS = $(bt_cppflags)
WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \
-Wcast-qual
@@ -61,8 +64,9 @@ obj_prefix = std_stacktrace
# Each FILE.c in SOURCES will be compiled to SHORTNAME-FILE.o
libstdc___libbacktrace_la_SHORTNAME = $(obj_prefix)
+libstdc___libbacktraceconvenience_la_SHORTNAME = $(obj_prefix)
-libstdc___libbacktrace_la_SOURCES = \
+sources = \
atomic.c \
backtrace.c \
dwarf.c \
@@ -72,6 +76,8 @@ libstdc___libbacktrace_la_SOURCES = \
simple.c \
state.c \
cp-demangle.c
+libstdc___libbacktrace_la_SOURCES = $(sources)
+libstdc___libbacktraceconvenience_la_SOURCES = $(sources)
FORMAT_FILES = \
elf.c \
@@ -86,19 +92,25 @@ ALLOC_FILES = \
alloc.c \
mmap.c
-EXTRA_libstdc___libbacktrace_la_SOURCES = \
+extra_sources = \
$(FORMAT_FILES) \
$(VIEW_FILES) \
$(ALLOC_FILES)
+EXTRA_libstdc___libbacktrace_la_SOURCES = $(extra_sources)
+EXTRA_libstdc___libbacktraceconvenience_la_SOURCES = $(extra_sources)
+
# These three files are chosen by configure and added to the link.
# We need the SHORTNAME- prefix so that they use the custom CPPFLAGS above.
-libstdc___libbacktrace_la_LIBADD = \
+conf_sources = \
$(obj_prefix)-$(FORMAT_FILE) \
$(obj_prefix)-$(VIEW_FILE) \
$(obj_prefix)-$(ALLOC_FILE)
+libstdc___libbacktrace_la_LIBADD = $(conf_sources)
+libstdc___libbacktraceconvenience_la_LIBADD = $(conf_sources)
-libstdc___libbacktrace_la_DEPENDENCIES = $(libstdc___libbacktrace_la_LIBADD)
+libstdc___libbacktrace_la_DEPENDENCIES = $(conf_sources)
+libstdc___libbacktraceconvenience_la_DEPENDENCIES = $(conf_sources)
# Use symlinks for the sources
diff --git a/libstdc++-v3/src/libbacktrace/Makefile.in b/libstdc++-v3/src/libbacktrace/Makefile.in
index 6b898f65b06..681d014f3a7 100644
--- a/libstdc++-v3/src/libbacktrace/Makefile.in
+++ b/libstdc++-v3/src/libbacktrace/Makefile.in
@@ -150,18 +150,50 @@ DIST_COMMON = $(srcdir)/Makefile.am
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES = backtrace-supported.h
CONFIG_CLEAN_VPATH_FILES =
-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 \
- $(obj_prefix)-sort.lo $(obj_prefix)-simple.lo \
- $(obj_prefix)-state.lo $(obj_prefix)-cp-demangle.lo
+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 = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
+am__objects_1 = $(obj_prefix)-atomic.lo $(obj_prefix)-backtrace.lo \
+ $(obj_prefix)-dwarf.lo $(obj_prefix)-fileline.lo \
+ $(obj_prefix)-posix.lo $(obj_prefix)-sort.lo \
+ $(obj_prefix)-simple.lo $(obj_prefix)-state.lo \
+ $(obj_prefix)-cp-demangle.lo
+am_libstdc___libbacktrace_la_OBJECTS = $(am__objects_1)
libstdc___libbacktrace_la_OBJECTS = \
$(am_libstdc___libbacktrace_la_OBJECTS)
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 =
+am_libstdc___libbacktraceconvenience_la_OBJECTS = $(am__objects_1)
+libstdc___libbacktraceconvenience_la_OBJECTS = \
+ $(am_libstdc___libbacktraceconvenience_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -189,7 +221,9 @@ am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(libstdc___libbacktrace_la_SOURCES) \
- $(EXTRA_libstdc___libbacktrace_la_SOURCES)
+ $(EXTRA_libstdc___libbacktrace_la_SOURCES) \
+ $(libstdc___libbacktraceconvenience_la_SOURCES) \
+ $(EXTRA_libstdc___libbacktraceconvenience_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -456,11 +490,12 @@ WARN_CXXFLAGS = \
# -I/-D flags to pass when compiling.
AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS)
-noinst_LTLIBRARIES = libstdc++_libbacktrace.la
+toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la
+noinst_LTLIBRARIES = libstdc++_libbacktraceconvenience.la
ACLOCAL_AMFLAGS = -I ../.. -I ../../config
# This will be used instead of the common AM_CPPFLAGS from fragment.am
-libstdc___libbacktrace_la_CPPFLAGS = \
+bt_cppflags = \
-I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
-I ../../../libgcc -I .. -I $(top_srcdir) \
-I $(top_srcdir)/../libbacktrace \
@@ -468,6 +503,8 @@ libstdc___libbacktrace_la_CPPFLAGS = \
-include $(top_srcdir)/src/libbacktrace/backtrace-rename.h \
$(BACKTRACE_CPPFLAGS)
+libstdc___libbacktrace_la_CPPFLAGS = $(bt_cppflags)
+libstdc___libbacktraceconvenience_la_CPPFLAGS = $(bt_cppflags)
C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wno-unused-but-set-variable
CXX_WARN_FLAGS = $(WARN_FLAGS) -Wno-unused-parameter
AM_CFLAGS = $(glibcxx_lt_pic_flag) $(glibcxx_compiler_shared_flag) \
@@ -478,7 +515,8 @@ obj_prefix = std_stacktrace
# Each FILE.c in SOURCES will be compiled to SHORTNAME-FILE.o
libstdc___libbacktrace_la_SHORTNAME = $(obj_prefix)
-libstdc___libbacktrace_la_SOURCES = \
+libstdc___libbacktraceconvenience_la_SHORTNAME = $(obj_prefix)
+sources = \
atomic.c \
backtrace.c \
dwarf.c \
@@ -489,6 +527,8 @@ libstdc___libbacktrace_la_SOURCES = \
state.c \
cp-demangle.c
+libstdc___libbacktrace_la_SOURCES = $(sources)
+libstdc___libbacktraceconvenience_la_SOURCES = $(sources)
FORMAT_FILES = \
elf.c \
pecoff.c \
@@ -502,20 +542,25 @@ ALLOC_FILES = \
alloc.c \
mmap.c
-EXTRA_libstdc___libbacktrace_la_SOURCES = \
+extra_sources = \
$(FORMAT_FILES) \
$(VIEW_FILES) \
$(ALLOC_FILES)
+EXTRA_libstdc___libbacktrace_la_SOURCES = $(extra_sources)
+EXTRA_libstdc___libbacktraceconvenience_la_SOURCES = $(extra_sources)
# These three files are chosen by configure and added to the link.
# We need the SHORTNAME- prefix so that they use the custom CPPFLAGS above.
-libstdc___libbacktrace_la_LIBADD = \
+conf_sources = \
$(obj_prefix)-$(FORMAT_FILE) \
$(obj_prefix)-$(VIEW_FILE) \
$(obj_prefix)-$(ALLOC_FILE)
-libstdc___libbacktrace_la_DEPENDENCIES = $(libstdc___libbacktrace_la_LIBADD)
+libstdc___libbacktrace_la_LIBADD = $(conf_sources)
+libstdc___libbacktraceconvenience_la_LIBADD = $(conf_sources)
+libstdc___libbacktrace_la_DEPENDENCIES = $(conf_sources)
+libstdc___libbacktraceconvenience_la_DEPENDENCIES = $(conf_sources)
LTCOMPILE = \
$(LIBTOOL) --tag CC --tag disable-shared \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
@@ -577,8 +622,46 @@ clean-noinstLTLIBRARIES:
rm -f $${locs}; \
}
+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)'; \
+ 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}; \
+ }
+
libstdc++_libbacktrace.la: $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_DEPENDENCIES) $(EXTRA_libstdc___libbacktrace_la_DEPENDENCIES)
- $(AM_V_CCLD)$(LINK) $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_LIBADD) $(LIBS)
+ $(AM_V_CCLD)$(LINK) -rpath $(toolexeclibdir) $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_LIBADD) $(LIBS)
+
+libstdc++_libbacktraceconvenience.la: $(libstdc___libbacktraceconvenience_la_OBJECTS) $(libstdc___libbacktraceconvenience_la_DEPENDENCIES) $(EXTRA_libstdc___libbacktraceconvenience_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libstdc___libbacktraceconvenience_la_OBJECTS) $(libstdc___libbacktraceconvenience_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -704,6 +787,9 @@ 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
@@ -737,7 +823,7 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
- mostlyclean-am
+ clean-toolexeclibLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f Makefile
@@ -762,7 +848,7 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am:
+install-exec-am: install-toolexeclibLTLIBRARIES
install-html: install-html-am
@@ -801,23 +887,25 @@ ps: ps-am
ps-am:
-uninstall-am:
+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-noinstLTLIBRARIES 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 \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
- 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
+ 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols
2024-04-18 17:29 ` [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols Jonathan Wakely
@ 2024-04-25 16:23 ` Jonathan Wakely
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-25 16:23 UTC (permalink / raw)
To: libstdc++, gcc-patches
Pushed to gcc-13
On Thu, 18 Apr 2024 at 20:51, Jonathan Wakely <jwakely@redhat.com> 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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [gcc-13 PATCH 2/2 v3] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp
2024-04-18 20:34 ` Jonathan Wakely
@ 2024-04-25 17:58 ` Jonathan Wakely
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Wakely @ 2024-04-25 17:58 UTC (permalink / raw)
To: libstdc++, gcc Patches
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
On Thu, 18 Apr 2024 at 21:34, Jonathan Wakely wrote:
>
> On Thu, 18 Apr 2024 at 20:51, Jonathan Wakely wrote:
> >
> > 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.
>
> It looks like simply duplicating all the libstdc___libbacktrace_FOO
> variables in libbacktrace/Makefile.am does work (see attached patch),
> so that we get an installed libstdc++_libbacktrace.a and a
> not-installed libstdc++_libbacktraceconvenience.a which gets included
> into the installed libstdc++exp.a
>
> So if that's preferable to making the installed
> libstdc++_libbacktrace.a a symlink, we can do that.
>
> I still kinda like the symlink approach, because it reduces the size
> on disk, and the same approach could be used to get rid of
> libstdc++fs.a without breaking makefiles using -lstdc++fs
I committed the symlink approach, but with a slightly different patch
(attached).
This one installs libstdc++_libbacktrace.a as a symlink, but also
removes the .la libtool file for that archive, because I don't think
it's any use. I also added an uninstall-local target so the symlink
gets removed.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 11730 bytes --]
commit f3cff718df0cf7590ccf9bc1d8cd17e4e08f1e6d
Author: Jonathan Wakely <jwakely@redhat.com>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-04-25 17:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 17:29 [gcc-13 PATCH 0/2] Replace libstdc++_libbacktrace.a with libstdc++exp.a Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 1/2] libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols Jonathan Wakely
2024-04-25 16:23 ` Jonathan Wakely
2024-04-18 17:29 ` [gcc-13 PATCH 2/2] libstdc++: Add libstdc++_libbacktrace.a to libstdc++exp Jonathan Wakely
2024-04-18 20:34 ` Jonathan Wakely
2024-04-25 17:58 ` [gcc-13 PATCH 2/2 v3] " Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).