mirror of
https://github.com/gcc-mirror/gcc.git
synced 2024-11-21 13:40:47 +00:00
b96b554592
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.
97 lines
2.4 KiB
Bash
Executable File
97 lines
2.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
#
|
|
# This script computes the various flags needed to run GNU C++ testsuites
|
|
# (compiler specific as well as library specific).
|
|
#
|
|
# Written by Benjamin Kosnik <bkoz@redhat.com>
|
|
# Gabriel Dos Reis <gdr@codesourcery.com>
|
|
#
|
|
|
|
# Print a message saying how this script is intended to be invoked
|
|
print_usage() {
|
|
cat <<EOF
|
|
Usage:
|
|
testsuite_flags --install-includes
|
|
--build-includes
|
|
--build-cxx
|
|
--build-cc
|
|
--install-cxx
|
|
--cxxflags
|
|
--cxxldflags
|
|
--cxxpchflags
|
|
--cxxvtvflags
|
|
|
|
EOF
|
|
}
|
|
|
|
# Establish configure-generated directory structure.
|
|
BUILD_DIR=@glibcxx_builddir@
|
|
SRC_DIR=@glibcxx_srcdir@
|
|
PREFIX_DIR=@glibcxx_prefixdir@
|
|
query=$1
|
|
|
|
case ${query} in
|
|
--install-includes)
|
|
INCLUDES="-I${SRC_DIR}/testsuite/util"
|
|
echo ${INCLUDES}
|
|
;;
|
|
--build-includes)
|
|
INCLUDES="-nostdinc++ @GLIBCXX_INCLUDES@
|
|
-I${SRC_DIR}/include/backward -I${SRC_DIR}/testsuite/util"
|
|
echo ${INCLUDES}
|
|
;;
|
|
--install-cxx)
|
|
CXX=${PREFIX_DIR}/bin/g++
|
|
echo ${CXX}
|
|
;;
|
|
--build-cxx)
|
|
CXX_build="@CXX@"
|
|
CXX=`echo "$CXX_build" | sed 's,gcc/xgcc ,gcc/xg++ ,'`
|
|
echo ${CXX}
|
|
;;
|
|
--build-cc)
|
|
CC_build="@CC@"
|
|
CC="$CC_build"
|
|
echo ${CC}
|
|
;;
|
|
--cxxflags)
|
|
CXXFLAGS_default="-fmessage-length=0 -fno-show-column"
|
|
CXXFLAGS_config="@SECTION_FLAGS@ @EXTRA_CXX_FLAGS@"
|
|
echo ${CXXFLAGS_default} ${CXXFLAGS_config}
|
|
;;
|
|
--cxxvtvflags)
|
|
CXXFLAGS_vtv="@VTV_CXXFLAGS@"
|
|
LDFLAGS_vtv="@VTV_CXXLINKFLAGS@"
|
|
echo ${CXXFLAGS_vtv} ${LDFLAGS_vtv}
|
|
;;
|
|
--cxxparallelflags)
|
|
CXXFLAGS_parallel="-D_GLIBCXX_PARALLEL -fopenmp
|
|
-B${BUILD_DIR}/../libgomp
|
|
-I${BUILD_DIR}/../libgomp
|
|
-L${BUILD_DIR}/../libgomp/.libs -lgomp"
|
|
echo ${CXXFLAGS_parallel}
|
|
;;
|
|
--cxxpchflags)
|
|
PCHFLAGS="@glibcxx_PCHFLAGS@"
|
|
echo ${PCHFLAGS}
|
|
;;
|
|
--cxxldflags)
|
|
FS_LDFLAGS=
|
|
EXP_LDFLAGS=
|
|
if [ -d ${BUILD_DIR}/src/filesystem/.libs ]; then
|
|
FS_LDFLAGS=-L${BUILD_DIR}/src/filesystem/.libs
|
|
fi
|
|
if [ -d ${BUILD_DIR}/src/experimental/.libs ]; then
|
|
EXP_LDFLAGS=-L${BUILD_DIR}/src/experimental/.libs
|
|
fi
|
|
SECTIONLDFLAGS="@SECTION_LDFLAGS@ @LIBICONV@ $FS_LDFLAGS $EXP_LDFLAGS"
|
|
echo ${SECTIONLDFLAGS}
|
|
;;
|
|
*)
|
|
print_usage
|
|
;;
|
|
esac
|
|
|
|
exit 0
|