aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/src/experimental
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-09-07 10:24:56 +0100
committerJonathan Wakely <jwakely@redhat.com>2023-09-08 18:04:12 +0100
commitb96b554592c5cbb6a2c1797ffcb5706fd295f4fd (patch)
tree62d0bbe4c052f2d8a1e9e4edec5e858ad2e99aa5 /libstdc++-v3/src/experimental
parent1a0c6decd2112267c88438466df2e1c46b20248e (diff)
downloadgcc-b96b554592c5cbb6a2c1797ffcb5706fd295f4fd.zip
gcc-b96b554592c5cbb6a2c1797ffcb5706fd295f4fd.tar.gz
gcc-b96b554592c5cbb6a2c1797ffcb5706fd295f4fd.tar.bz2
libstdc++: Add Filesystem TS and std::stacktrace symbols to libstdc++exp.a
This consolidates the three static archives for extensions into one, so that -lstdc++exp can be used to provide the definitions of all unstable library features. The libstdc++_libbacktrace.a archive is now just a "noinst" convenience library that is only used during the build, not installed. Its contents are added to libstdc++exp.a, along with the new non-inline definitions of std::stacktrace symbols. The libstdc++fs.a archive is still installed, but its contents are duplicated in libstdc++exp.a now. This means -lstdc++exp can be used instead of -lstdc++fs. For targets using the GNU linker we should consider replacing libstdc++fs.a with a linker script that does INPUT(libstdc++exp.a). The tests for <experimental/filesystem> could be changed to use -lstdc++exp instead of -lstdc++fs, which would allow removing src/filesystem/.libs from the LDFLAGS in scripts/testsuite_flags.in, but that can be done at a later date. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++23 directory. * configure: Regenerate. * doc/html/manual/*: Regenerate. * doc/xml/manual/using.xml: Update documentation on linking. * include/std/stacktrace: Remove declarations of libbacktrace APIs. (stacktrace_entry::_S_err_handler, stacktrace_entry::_S_init): Remove. (stacktrace_entry::_Info): New class. (stacktrace_entry::_M_get_info): Use _Info. (__stacktrace_impl): New class. (basic_stacktrace): Derive from __stacktrace_impl. (basic_stacktrace::current): Use __stacktrace_impl::_S_current. * scripts/testsuite_flags.in: Adjust LDFLAGS to find libstdc++exp instead of libstdc++_libbacktrace. * src/Makefile.am (SUBDIRS): Add c++23 directory. * src/Makefile.in: Regenerate. * src/c++20/Makefile.am: Fix comment. * src/c++20/Makefile.in: Regenerate. * src/c++23/Makefile.am: New file. * src/c++23/Makefile.in: New file. * src/c++23/stacktrace.cc: New file with definitions of stacktrace_entry::_Info and __stacktrace_impl members. * src/experimental/Makefile.am: Use LIBADD to include other libraries. * src/experimental/Makefile.in: Regenerate. * src/libbacktrace/Makefile.am: Use noinst_LTLIBRARIES. * src/libbacktrace/Makefile.in: Regenerate. * testsuite/19_diagnostics/stacktrace/current.cc: Adjust dg-options to use -lstdc++exp. * testsuite/19_diagnostics/stacktrace/entry.cc: Likewise. * testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise. * testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: Likewise.
Diffstat (limited to 'libstdc++-v3/src/experimental')
-rw-r--r--libstdc++-v3/src/experimental/Makefile.am20
-rw-r--r--libstdc++-v3/src/experimental/Makefile.in15
2 files changed, 34 insertions, 1 deletions
diff --git a/libstdc++-v3/src/experimental/Makefile.am b/libstdc++-v3/src/experimental/Makefile.am
index 3b962e7..a61465f 100644
--- a/libstdc++-v3/src/experimental/Makefile.am
+++ b/libstdc++-v3/src/experimental/Makefile.am
@@ -24,6 +24,18 @@ include $(top_srcdir)/fragment.am
toolexeclib_LTLIBRARIES = libstdc++exp.la
+if ENABLE_FILESYSTEM_TS
+filesystem_lib = $(top_builddir)/src/filesystem/libstdc++fs.la
+else
+filesystem_lib =
+endif
+
+if ENABLE_BACKTRACE
+backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la
+else
+backtrace_lib =
+endif
+
headers =
sources = \
@@ -33,6 +45,14 @@ sources = \
libstdc__exp_la_SOURCES = $(sources)
+libstdc__exp_la_LIBADD = \
+ $(top_builddir)/src/c++23/libc++23convenience.la \
+ $(filesystem_lib) $(backtrace_lib)
+
+libstdc__exp_la_DEPENDENCIES = \
+ $(top_builddir)/src/c++23/libc++23convenience.la \
+ $(filesystem_lib) $(backtrace_lib)
+
# 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
# set this option because CONFIG_CXXFLAGS has to be after
diff --git a/libstdc++-v3/src/experimental/Makefile.in b/libstdc++-v3/src/experimental/Makefile.in
index 671f070..0ff402d 100644
--- a/libstdc++-v3/src/experimental/Makefile.in
+++ b/libstdc++-v3/src/experimental/Makefile.in
@@ -148,7 +148,8 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(toolexeclibdir)"
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
-libstdc__exp_la_LIBADD =
+@ENABLE_FILESYSTEM_TS_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/filesystem/libstdc++fs.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)
libstdc__exp_la_OBJECTS = $(am_libstdc__exp_la_OBJECTS)
@@ -448,6 +449,10 @@ WARN_CXXFLAGS = \
# -I/-D flags to pass when compiling.
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_BACKTRACE_FALSE@backtrace_lib =
+@ENABLE_BACKTRACE_TRUE@backtrace_lib = $(top_builddir)/src/libbacktrace/libstdc++_libbacktrace.la
headers =
sources = \
contract.cc
@@ -455,6 +460,14 @@ sources = \
# vpath % $(top_srcdir)/src/experimental
libstdc__exp_la_SOURCES = $(sources)
+libstdc__exp_la_LIBADD = \
+ $(top_builddir)/src/c++23/libc++23convenience.la \
+ $(filesystem_lib) $(backtrace_lib)
+
+libstdc__exp_la_DEPENDENCIES = \
+ $(top_builddir)/src/c++23/libc++23convenience.la \
+ $(filesystem_lib) $(backtrace_lib)
+
# 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