diff options
30 files changed, 2605 insertions, 14 deletions
diff --git a/libstdc++-v3/Makefile.in b/libstdc++-v3/Makefile.in index 150e4d0..58a0acd 100644 --- a/libstdc++-v3/Makefile.in +++ b/libstdc++-v3/Makefile.in @@ -185,6 +185,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -196,6 +197,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -240,6 +245,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -295,6 +301,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index b770d5b..336c690 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -49,7 +49,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [ # Keep these sync'd with the list in Makefile.am. The first provides an # expandable list at autoconf time; the second provides an expandable list # (i.e., shell variable) at configure time. - m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/filesystem doc po testsuite python]) + m4_define([glibcxx_SUBDIRS],[include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/filesystem src/libbacktrace doc po testsuite python]) SUBDIRS='glibcxx_SUBDIRS' # These need to be absolute paths, yet at the same time need to @@ -4801,6 +4801,142 @@ AC_DEFUN([GLIBCXX_CHECK_ARC4RANDOM], [ AC_LANG_RESTORE ]) +dnl +dnl Check to see whether to build libstdc++_libbacktrace.a +dnl +dnl --enable-libstdcxx-backtrace +dnl +AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [ + GLIBCXX_ENABLE(libstdcxx-backtrace,auto,, + [turns on libbacktrace support], + [permit yes|no|auto]) + + # Most of this is adapted from libsanitizer/configure.ac + + BACKTRACE_CPPFLAGS= + + # libbacktrace only needs atomics for int, which we've already tested + if test "$glibcxx_cv_atomic_int" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_ATOMIC_FUNCTIONS=1" + fi + + # Test for __sync support. + AC_CACHE_CHECK([__sync extensions], + [glibcxx_cv_sys_sync], + [GCC_TRY_COMPILE_OR_LINK( + [int i;], + [__sync_bool_compare_and_swap (&i, i, i); + __sync_lock_test_and_set (&i, 1); + __sync_lock_release (&i);], + [glibcxx_cv_sys_sync=yes], + [glibcxx_cv_sys_sync=no]) + ]) + if test "$glibcxx_cv_sys_sync" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_SYNC_FUNCTIONS=1" + fi + + # Check for dl_iterate_phdr. + AC_CHECK_HEADERS(link.h) + if test "$ac_cv_header_link_h" = "no"; then + have_dl_iterate_phdr=no + else + # When built as a GCC target library, we can't do a link test. + AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes], + [have_dl_iterate_phdr=no]) + fi + if test "$have_dl_iterate_phdr" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1" + fi + + # Check for the fcntl function. + if test -n "${with_target_subdir}"; then + case "${host}" in + *-*-mingw*) have_fcntl=no ;; + *) have_fcntl=yes ;; + esac + else + AC_CHECK_FUNC(fcntl, [have_fcntl=yes], [have_fcntl=no]) + fi + if test "$have_fcntl" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_FCNTL=1" + fi + + AC_CHECK_DECLS(strnlen) + + # Check for getexecname function. + if test -n "${with_target_subdir}"; then + case "${host}" in + *-*-solaris2*) have_getexecname=yes ;; + *) have_getexecname=no ;; + esac + else + AC_CHECK_FUNC(getexecname, [have_getexecname=yes], [have_getexecname=no]) + fi + if test "$have_getexecname" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_GETEXECNAME=1" + fi + +# The library needs to be able to read the executable itself. Compile +# a file to determine the executable format. The awk script +# filetype.awk prints out the file type. +AC_CACHE_CHECK([output filetype], +[glibcxx_cv_sys_filetype], +[filetype= +AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([int i;], [int j;])], + [filetype=`${AWK} -f $srcdir/../libbacktrace/filetype.awk conftest.$ac_objext`], + [AC_MSG_FAILURE([compiler failed])]) +glibcxx_cv_sys_filetype=$filetype]) + +# Match the file type to decide what files to compile. +FORMAT_FILE= +case "$glibcxx_cv_sys_filetype" in +elf*) FORMAT_FILE="elf.lo" ;; +*) AC_MSG_WARN([could not determine output file type]) + FORMAT_FILE="unknown.lo" + enable_libstdcxx_backtrace=no + ;; +esac +AC_SUBST(FORMAT_FILE) + +# ELF defines. +elfsize= +case "$glibcxx_cv_sys_filetype" in +elf32) elfsize=32 ;; +elf64) elfsize=64 ;; +esac +BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DBACKTRACE_ELF_SIZE=$elfsize" + + ALLOC_FILE=alloc.lo + AC_SUBST(ALLOC_FILE) + VIEW_FILE=read.lo + AC_SUBST(VIEW_FILE) + + AC_MSG_CHECKING([whether to build libbacktrace support]) + if test "$enable_libstdcxx_backtrace" == "auto"; then + enable_libstdcxx_backtrace=no + fi + if test "$enable_libstdcxx_backtrace" == "yes"; then + BACKTRACE_SUPPORTED=1 + BACKTRACE_USES_MALLOC=1 + if test "$ac_has_gthreads" = "yes"; then + BACKTRACE_SUPPORTS_THREADS=1 + else + BACKTRACE_SUPPORTS_THREADS=0 + fi + AC_SUBST(BACKTRACE_CPPFLAGS) + AC_SUBST(BACKTRACE_SUPPORTED) + AC_SUBST(BACKTRACE_USES_MALLOC) + AC_SUBST(BACKTRACE_SUPPORTS_THREADS) + AC_DEFINE(HAVE_STACKTRACE, 1, [Define if the <stacktrace> header is supported.]) + else + BACKTRACE_SUPPORTED=0 + BACKTRACE_USES_MALLOC=0 + BACKTRACE_SUPPORTS_THREADS=0 + fi + AC_MSG_RESULT($enable_libstdcxx_backtrace) + GLIBCXX_CONDITIONAL(ENABLE_BACKTRACE, [test "$enable_libstdcxx_backtrace" != no]) +]) # Macros from the top-level gcc directory. m4_include([../config/gc++filt.m4]) diff --git a/libstdc++-v3/config.h.in b/libstdc++-v3/config.h.in index 10675fe..168961a 100644 --- a/libstdc++-v3/config.h.in +++ b/libstdc++-v3/config.h.in @@ -66,6 +66,10 @@ /* Define to 1 if you have the `cosl' function. */ #undef HAVE_COSL +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNLEN + /* Define to 1 if you have the <dirent.h> header file. */ #undef HAVE_DIRENT_H @@ -213,6 +217,9 @@ /* Define if link is available in <unistd.h>. */ #undef HAVE_LINK +/* Define to 1 if you have the <link.h> header file. */ +#undef HAVE_LINK_H + /* Define if futex syscall is available. */ #undef HAVE_LINUX_FUTEX @@ -346,6 +353,9 @@ /* Define to 1 if you have the `sqrtl' function. */ #undef HAVE_SQRTL +/* Define if the <stacktrace> header is supported. */ +#undef HAVE_STACKTRACE + /* Define to 1 if you have the <stdalign.h> header file. */ #undef HAVE_STDALIGN_H diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 0f29186..34f6718 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -675,6 +675,15 @@ DOT DOXYGEN BUILD_INFO_FALSE BUILD_INFO_TRUE +ENABLE_BACKTRACE_FALSE +ENABLE_BACKTRACE_TRUE +BACKTRACE_SUPPORTS_THREADS +BACKTRACE_USES_MALLOC +BACKTRACE_SUPPORTED +BACKTRACE_CPPFLAGS +VIEW_FILE +ALLOC_FILE +FORMAT_FILE ENABLE_FILESYSTEM_TS_FALSE ENABLE_FILESYSTEM_TS_TRUE baseline_subdir_switch @@ -947,6 +956,7 @@ enable_libstdcxx_dual_abi with_default_libstdcxx_abi enable_libstdcxx_threads enable_libstdcxx_filesystem_ts +enable_libstdcxx_backtrace enable_cet with_gxx_include_dir enable_version_specific_runtime_libs @@ -1653,6 +1663,8 @@ Optional Features: enable C++11 threads support [default=auto] --enable-libstdcxx-filesystem-ts turns on ISO/IEC TS 18822 support [default=auto] + --enable-libstdcxx-backtrace + turns on libbacktrace support [default=auto] --enable-cet enable Intel CET in target libraries [default=auto] --enable-version-specific-runtime-libs Specify that runtime libraries should be installed @@ -5539,7 +5551,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; } # expandable list at autoconf time; the second provides an expandable list # (i.e., shell variable) at configure time. - SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/filesystem doc po testsuite python' + SUBDIRS='include libsupc++ src src/c++98 src/c++11 src/c++17 src/c++20 src/filesystem src/libbacktrace doc po testsuite python' # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount @@ -12179,7 +12191,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12182 "configure" +#line 12194 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12285,7 +12297,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12288 "configure" +#line 12300 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -15969,7 +15981,7 @@ $as_echo "$glibcxx_cv_atomic_long_long" >&6; } # Fake what AC_TRY_COMPILE does. cat > conftest.$ac_ext << EOF -#line 15972 "configure" +#line 15984 "configure" int main() { typedef bool atomic_type; @@ -16004,7 +16016,7 @@ $as_echo "$glibcxx_cv_atomic_bool" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16007 "configure" +#line 16019 "configure" int main() { typedef short atomic_type; @@ -16039,7 +16051,7 @@ $as_echo "$glibcxx_cv_atomic_short" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16042 "configure" +#line 16054 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -16075,7 +16087,7 @@ $as_echo "$glibcxx_cv_atomic_int" >&6; } rm -f conftest* cat > conftest.$ac_ext << EOF -#line 16078 "configure" +#line 16090 "configure" int main() { typedef long long atomic_type; @@ -16228,7 +16240,7 @@ $as_echo "mutex" >&6; } # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16231 "configure" +#line 16243 "configure" int main() { _Decimal32 d1; @@ -16270,7 +16282,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for this test. cat > conftest.$ac_ext << EOF -#line 16273 "configure" +#line 16285 "configure" template<typename T1, typename T2> struct same { typedef T2 type; }; @@ -76951,6 +76963,263 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # Check whether --enable-libstdcxx-backtrace was given. +if test "${enable_libstdcxx_backtrace+set}" = set; then : + enableval=$enable_libstdcxx_backtrace; + case "$enableval" in + yes|no|auto) ;; + *) as_fn_error $? "Unknown argument to enable/disable libstdcxx-backtrace" "$LINENO" 5 ;; + esac + +else + enable_libstdcxx_backtrace=auto +fi + + + + # Most of this is adapted from libsanitizer/configure.ac + + BACKTRACE_CPPFLAGS= + + # libbacktrace only needs atomics for int, which we've already tested + if test "$glibcxx_cv_atomic_int" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_ATOMIC_FUNCTIONS=1" + fi + + # Test for __sync support. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking __sync extensions" >&5 +$as_echo_n "checking __sync extensions... " >&6; } +if ${glibcxx_cv_sys_sync+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test x$gcc_no_link = xyes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ +__sync_bool_compare_and_swap (&i, i, i); + __sync_lock_test_and_set (&i, 1); + __sync_lock_release (&i); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_sys_sync=yes +else + glibcxx_cv_sys_sync=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + if test x$gcc_no_link = xyes; then + as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ +__sync_bool_compare_and_swap (&i, i, i); + __sync_lock_test_and_set (&i, 1); + __sync_lock_release (&i); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + glibcxx_cv_sys_sync=yes +else + glibcxx_cv_sys_sync=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_sync" >&5 +$as_echo "$glibcxx_cv_sys_sync" >&6; } + if test "$glibcxx_cv_sys_sync" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_SYNC_FUNCTIONS=1" + fi + + # Check for dl_iterate_phdr. + for ac_header in link.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "link.h" "ac_cv_header_link_h" "$ac_includes_default" +if test "x$ac_cv_header_link_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LINK_H 1 +_ACEOF + +fi + +done + + if test "$ac_cv_header_link_h" = "no"; then + have_dl_iterate_phdr=no + else + # When built as a GCC target library, we can't do a link test. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <link.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "dl_iterate_phdr" >/dev/null 2>&1; then : + have_dl_iterate_phdr=yes +else + have_dl_iterate_phdr=no +fi +rm -f conftest* + + fi + if test "$have_dl_iterate_phdr" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1" + fi + + # Check for the fcntl function. + if test -n "${with_target_subdir}"; then + case "${host}" in + *-*-mingw*) have_fcntl=no ;; + *) have_fcntl=yes ;; + esac + else + ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" +if test "x$ac_cv_func_fcntl" = xyes; then : + have_fcntl=yes +else + have_fcntl=no +fi + + fi + if test "$have_fcntl" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_FCNTL=1" + fi + + ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" +if test "x$ac_cv_have_decl_strnlen" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRNLEN $ac_have_decl +_ACEOF + + + # Check for getexecname function. + if test -n "${with_target_subdir}"; then + case "${host}" in + *-*-solaris2*) have_getexecname=yes ;; + *) have_getexecname=no ;; + esac + else + ac_fn_c_check_func "$LINENO" "getexecname" "ac_cv_func_getexecname" +if test "x$ac_cv_func_getexecname" = xyes; then : + have_getexecname=yes +else + have_getexecname=no +fi + + fi + if test "$have_getexecname" = "yes"; then + BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_GETEXECNAME=1" + fi + +# The library needs to be able to read the executable itself. Compile +# a file to determine the executable format. The awk script +# filetype.awk prints out the file type. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking output filetype" >&5 +$as_echo_n "checking output filetype... " >&6; } +if ${glibcxx_cv_sys_filetype+:} false; then : + $as_echo_n "(cached) " >&6 +else + filetype= +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int i; +int +main () +{ +int j; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + filetype=`${AWK} -f $srcdir/../libbacktrace/filetype.awk conftest.$ac_objext` +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "compiler failed +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +glibcxx_cv_sys_filetype=$filetype +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sys_filetype" >&5 +$as_echo "$glibcxx_cv_sys_filetype" >&6; } + +# Match the file type to decide what files to compile. +FORMAT_FILE= +case "$glibcxx_cv_sys_filetype" in +elf*) FORMAT_FILE="elf.lo" ;; +*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not determine output file type" >&5 +$as_echo "$as_me: WARNING: could not determine output file type" >&2;} + FORMAT_FILE="unknown.lo" + enable_libstdcxx_backtrace=no + ;; +esac + + +# ELF defines. +elfsize= +case "$glibcxx_cv_sys_filetype" in +elf32) elfsize=32 ;; +elf64) elfsize=64 ;; +esac +BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DBACKTRACE_ELF_SIZE=$elfsize" + + ALLOC_FILE=alloc.lo + + VIEW_FILE=read.lo + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build libbacktrace support" >&5 +$as_echo_n "checking whether to build libbacktrace support... " >&6; } + if test "$enable_libstdcxx_backtrace" == "auto"; then + enable_libstdcxx_backtrace=no + fi + if test "$enable_libstdcxx_backtrace" == "yes"; then + BACKTRACE_SUPPORTED=1 + BACKTRACE_USES_MALLOC=1 + if test "$ac_has_gthreads" = "yes"; then + BACKTRACE_SUPPORTS_THREADS=1 + else + BACKTRACE_SUPPORTS_THREADS=0 + fi + + + + + +$as_echo "#define HAVE_STACKTRACE 1" >>confdefs.h + + else + BACKTRACE_SUPPORTED=0 + BACKTRACE_USES_MALLOC=0 + BACKTRACE_SUPPORTS_THREADS=0 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libstdcxx_backtrace" >&5 +$as_echo "$enable_libstdcxx_backtrace" >&6; } + + + # For Networking TS. for ac_header in fcntl.h sys/ioctl.h sys/socket.h sys/uio.h poll.h netdb.h arpa/inet.h netinet/in.h netinet/tcp.h do : @@ -77970,6 +78239,15 @@ else fi + if test "$enable_libstdcxx_backtrace" != no; then + ENABLE_BACKTRACE_TRUE= + ENABLE_BACKTRACE_FALSE='#' +else + ENABLE_BACKTRACE_TRUE='#' + ENABLE_BACKTRACE_FALSE= +fi + + cat >confcache <<\_ACEOF @@ -78235,6 +78513,8 @@ ac_config_files="$ac_config_files scripts/extract_symvers" ac_config_files="$ac_config_files doc/xsl/customization.xsl" +ac_config_files="$ac_config_files src/libbacktrace/backtrace-supported.h" + # Multilibs need MULTISUBDIR defined correctly in certain makefiles so # that multilib installs will end up installed in the correct place. @@ -78244,7 +78524,7 @@ ac_config_files="$ac_config_files doc/xsl/customization.xsl" # append it here. Only modify Makefiles that have just been created. # # Also, get rid of this simulated-VPATH thing that automake does. -ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/c++17/Makefile src/c++20/Makefile src/filesystem/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile" +ac_config_files="$ac_config_files include/Makefile libsupc++/Makefile src/Makefile src/c++98/Makefile src/c++11/Makefile src/c++17/Makefile src/c++20/Makefile src/filesystem/Makefile src/libbacktrace/Makefile doc/Makefile po/Makefile testsuite/Makefile python/Makefile" ac_config_commands="$ac_config_commands generate-headers" @@ -78479,6 +78759,10 @@ if test -z "${ENABLE_FILESYSTEM_TS_TRUE}" && test -z "${ENABLE_FILESYSTEM_TS_FAL as_fn_error $? "conditional \"ENABLE_FILESYSTEM_TS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_BACKTRACE_TRUE}" && test -z "${ENABLE_BACKTRACE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_BACKTRACE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BUILD_INFO_TRUE}" && test -z "${BUILD_INFO_FALSE}"; then as_fn_error $? "conditional \"BUILD_INFO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -79498,6 +79782,7 @@ do "scripts/testsuite_flags") CONFIG_FILES="$CONFIG_FILES scripts/testsuite_flags" ;; "scripts/extract_symvers") CONFIG_FILES="$CONFIG_FILES scripts/extract_symvers" ;; "doc/xsl/customization.xsl") CONFIG_FILES="$CONFIG_FILES doc/xsl/customization.xsl" ;; + "src/libbacktrace/backtrace-supported.h") CONFIG_FILES="$CONFIG_FILES src/libbacktrace/backtrace-supported.h" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "libsupc++/Makefile") CONFIG_FILES="$CONFIG_FILES libsupc++/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; @@ -79506,6 +79791,7 @@ do "src/c++17/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++17/Makefile" ;; "src/c++20/Makefile") CONFIG_FILES="$CONFIG_FILES src/c++20/Makefile" ;; "src/filesystem/Makefile") CONFIG_FILES="$CONFIG_FILES src/filesystem/Makefile" ;; + "src/libbacktrace/Makefile") CONFIG_FILES="$CONFIG_FILES src/libbacktrace/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; @@ -81386,6 +81672,17 @@ _EOF . ${multi_basedir}/config-ml.in { ml_norecursion=; unset ml_norecursion;} ;; + "src/libbacktrace/Makefile":F) cat > vpsed$$ << \_EOF +s!`test -f '$<' || echo '$(srcdir)/'`!! +_EOF + sed -f vpsed$$ $ac_file > tmp$$ + mv tmp$$ $ac_file + rm vpsed$$ + echo 'MULTISUBDIR =' >> $ac_file + ml_norecursion=yes + . ${multi_basedir}/config-ml.in + { ml_norecursion=; unset ml_norecursion;} + ;; "doc/Makefile":F) cat > vpsed$$ << \_EOF s!`test -f '$<' || echo '$(srcdir)/'`!! _EOF diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 827d770..2a3bc52 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -489,6 +489,8 @@ AC_CHECK_HEADERS([fcntl.h dirent.h sys/statvfs.h utime.h]) GLIBCXX_ENABLE_FILESYSTEM_TS GLIBCXX_CHECK_FILESYSTEM_DEPS +GLIBCXX_ENABLE_BACKTRACE + # For Networking TS. AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/socket.h sys/uio.h poll.h netdb.h arpa/inet.h netinet/in.h netinet/tcp.h]) AC_CHECK_DECL(F_GETFL,,,[#include <fcntl.h>]) @@ -629,6 +631,7 @@ AC_CONFIG_FILES(Makefile) AC_CONFIG_FILES([scripts/testsuite_flags],[chmod +x scripts/testsuite_flags]) AC_CONFIG_FILES([scripts/extract_symvers],[chmod +x scripts/extract_symvers]) AC_CONFIG_FILES([doc/xsl/customization.xsl]) +AC_CONFIG_FILES([src/libbacktrace/backtrace-supported.h]) # Multilibs need MULTISUBDIR defined correctly in certain makefiles so # that multilib installs will end up installed in the correct place. diff --git a/libstdc++-v3/doc/Makefile.in b/libstdc++-v3/doc/Makefile.in index 443d291..6aaceea 100644 --- a/libstdc++-v3/doc/Makefile.in +++ b/libstdc++-v3/doc/Makefile.in @@ -144,6 +144,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -155,6 +156,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -199,6 +204,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -254,6 +260,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 65b2b4e..d143192 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -80,6 +80,7 @@ std_headers = \ ${std_srcdir}/sstream \ ${std_srcdir}/syncstream \ ${std_srcdir}/stack \ + ${std_srcdir}/stacktrace \ ${std_srcdir}/stdexcept \ ${std_srcdir}/stop_token \ ${std_srcdir}/streambuf \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 98d7021..de2a25f 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -144,6 +144,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -155,6 +156,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -199,6 +204,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -254,6 +260,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ @@ -431,6 +438,7 @@ std_headers = \ ${std_srcdir}/sstream \ ${std_srcdir}/syncstream \ ${std_srcdir}/stack \ + ${std_srcdir}/stacktrace \ ${std_srcdir}/stdexcept \ ${std_srcdir}/stop_token \ ${std_srcdir}/streambuf \ diff --git a/libstdc++-v3/include/std/stacktrace b/libstdc++-v3/include/std/stacktrace new file mode 100644 index 0000000..623f44b --- /dev/null +++ b/libstdc++-v3/include/std/stacktrace @@ -0,0 +1,672 @@ +// <stacktrace> -*- C++ -*- + +// Copyright The GNU Toolchain Authors. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// Under Section 7 of GPL version 3, you are granted additional +// permissions described in the GCC Runtime Library Exception, version +// 3.1, as published by the Free Software Foundation. + +// You should have received a copy of the GNU General Public License and +// a copy of the GCC Runtime Library Exception along with this program; +// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +// <http://www.gnu.org/licenses/>. + +#ifndef _GLIBCXX_STACKTRACE +#define _GLIBCXX_STACKTRACE 1 + +#pragma GCC system_header + +#include <bits/c++config.h> + +#if __cplusplus > 202002L && _GLIBCXX_HAVE_STACKTRACE +#include <compare> +#include <string> +#include <sstream> +#include <bits/stl_algobase.h> +#include <bits/stl_algo.h> +#include <bits/stl_iterator.h> +#include <bits/stl_uninitialized.h> +#include <cxxabi.h> + +struct __glibcxx_backtrace_state; +struct __glibcxx_backtrace_simple_data; + +extern "C" +{ +__glibcxx_backtrace_state* +__glibcxx_backtrace_create_state(const char*, int, + void(*)(void*, const char*, int), + void*); + +int +__glibcxx_backtrace_simple(__glibcxx_backtrace_state*, int, + int (*) (void*, uintptr_t), + void(*)(void*, const char*, int), + void*); +int +__glibcxx_backtrace_pcinfo(__glibcxx_backtrace_state*, uintptr_t, + int (*)(void*, uintptr_t, + const char*, int, const char*), + void(*)(void*, const char*, int), + void*); + +int +__glibcxx_backtrace_syminfo(__glibcxx_backtrace_state*, uintptr_t addr, + void (*) (void*, uintptr_t, const char*, + uintptr_t, uintptr_t), + void(*)(void*, const char*, int), + void*); +} + +namespace std _GLIBCXX_VISIBILITY(default) +{ +_GLIBCXX_BEGIN_NAMESPACE_VERSION + +#define __cpp_lib_stacktrace 202011L + + // [stacktrace.entry], class stacktrace_entry + class stacktrace_entry + { + using uint_least32_t = __UINT_LEAST32_TYPE__; + using uintptr_t = __UINTPTR_TYPE__; + + public: + using native_handle_type = uintptr_t; + + // [stacktrace.entry.ctor], constructors + + constexpr + stacktrace_entry() noexcept = default; + + constexpr + stacktrace_entry(const stacktrace_entry& __other) noexcept = default; + + constexpr stacktrace_entry& + operator=(const stacktrace_entry& __other) noexcept = default; + + ~stacktrace_entry() = default; + + // [stacktrace.entry.obs], observers + + constexpr native_handle_type + native_handle() const noexcept { return _M_pc; } + + constexpr explicit operator bool() const noexcept { return _M_pc != -1; } + + // [stacktrace.entry.query], query + string + description() const + { + string __s; + _M_get_info(&__s, nullptr, nullptr); + return __s; + } + + string + source_file() const + { + string __s; + _M_get_info(nullptr, &__s, nullptr); + return __s; + } + + uint_least32_t + source_line() const + { + int __line = 0; + _M_get_info(nullptr, nullptr, &__line); + return __line; + } + + // [stacktrace.entry.cmp], comparison + friend constexpr bool + operator==(const stacktrace_entry& __x, + const stacktrace_entry& __y) noexcept + { return __x._M_pc == __y._M_pc; } + + friend constexpr strong_ordering + operator<=>(const stacktrace_entry& __x, + const stacktrace_entry& __y) noexcept + { return __x._M_pc <=> __y._M_pc; } + + private: + native_handle_type _M_pc = -1; + + template<typename _Allocator> friend class basic_stacktrace; + + static __glibcxx_backtrace_state* + _S_init() + { + static __glibcxx_backtrace_state* __state + = __glibcxx_backtrace_create_state(nullptr, 1, nullptr, nullptr); + return __state; + } + + template<typename _CharT, typename _Traits> + friend basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>&, const stacktrace_entry&); + + bool + _M_get_info(string* __desc, string* __file, int* __line) const + { + if (!*this) + return false; + + struct _Data + { + string* _M_desc; + string* _M_file; + int* _M_line; + } __data = { __desc, __file, __line }; + + auto __cb = [](void* __data, uintptr_t, const char* __filename, + int __lineno, const char* __function) -> int { + auto& __d = *static_cast<_Data*>(__data); + if (__function && __d._M_desc) + *__d._M_desc = _S_demangle(__function); + if (__filename && __d._M_file) + *__d._M_file = __filename; + if (__d._M_line) + *__d._M_line = __lineno; + return __function != nullptr; + }; + const auto __state = _S_init(); + if (::__glibcxx_backtrace_pcinfo(__state, _M_pc, +__cb, nullptr, &__data)) + return true; + if (__desc && __desc->empty()) + { + auto __cb2 = [](void* __data, uintptr_t, const char* __symname, + uintptr_t, uintptr_t) { + if (__symname) + *static_cast<_Data*>(__data)->_M_desc = _S_demangle(__symname); + }; + if (::__glibcxx_backtrace_syminfo(__state, _M_pc, +__cb2, nullptr, + &__data)) + return true; + } + return false; + } + + static string + _S_demangle(const char* __name) + { + string __s; + int __status; + char* __str = __cxxabiv1::__cxa_demangle(__name, nullptr, nullptr, + &__status); + if (__status == 0) + __s = __str; + __builtin_free(__str); + return __s; + } + }; + + // [stacktrace.basic], class template basic_stacktrace + template<typename _Allocator> + class basic_stacktrace + { + using _AllocTraits = allocator_traits<_Allocator>; + + public: + using value_type = stacktrace_entry; + using const_reference = const value_type&; + using reference = value_type&; + using const_iterator + = __gnu_cxx::__normal_iterator<value_type*, basic_stacktrace>; + using iterator = const_iterator; + using reverse_iterator = std::reverse_iterator<iterator>; + using const_reverse_iterator = std::reverse_iterator<const_iterator>; + using difference_type = ptrdiff_t; + using size_type = unsigned short; + using allocator_type = _Allocator; + + // [stacktrace.basic.ctor], creation and assignment + + static basic_stacktrace + current(const allocator_type& __alloc = allocator_type()) noexcept + { + return current(0, size_type(-1), __alloc); + } + + static basic_stacktrace + current(size_type __skip, + const allocator_type& __alloc = allocator_type()) noexcept + { + return current(__skip, size_type(-1), __alloc); + } + + static basic_stacktrace + current(size_type __skip, size_type __max_depth, + const allocator_type& __alloc = allocator_type()) noexcept + { + __glibcxx_assert(__skip <= (size_type(-1) - __max_depth)); + + auto __state = stacktrace_entry::_S_init(); + basic_stacktrace __ret(__alloc); + if (!__ret._M_reserve(std::min<int>(__max_depth, 64))) + return __ret; + + auto __cb = [](void* __data, uintptr_t __pc) { + auto& __s = *static_cast<basic_stacktrace*>(__data); + stacktrace_entry __f; + __f._M_pc = __pc; + if (__s._M_push_back(__f)) + return 0; + return 1; + }; + + if (__glibcxx_backtrace_simple(__state, __skip, +__cb, nullptr, + std::__addressof(__ret))) + { + __ret._M_clear(); + } + return __ret; + } + + basic_stacktrace() + noexcept(is_nothrow_default_constructible_v<allocator_type>) + { } + + explicit + basic_stacktrace(const allocator_type& __alloc) noexcept + : _M_alloc(__alloc) + { } + + basic_stacktrace(const basic_stacktrace& __other) noexcept + : basic_stacktrace(__other, __other._M_alloc) + { } + + basic_stacktrace(basic_stacktrace&& __other) noexcept + : _M_alloc(std::move(__other._M_alloc)), + _M_impl(std::__exchange(__other._M_impl, {})) + { } + + basic_stacktrace(const basic_stacktrace& __other, + const allocator_type& __alloc) noexcept + : _M_alloc(__alloc) + { + if (const auto __s = __other._M_impl._M_size) + if (auto __f = _M_impl._M_allocate(_M_alloc, __s)) + { + std::uninitialized_copy_n(__other.begin(), __s, __f); + _M_impl._M_size = __s; + } + } + + basic_stacktrace(basic_stacktrace&& __other, + const allocator_type& __alloc) noexcept + : _M_alloc(__alloc) + { + if constexpr (_Allocator::is_always_equal::value) + { + _M_impl = std::__exchange(__other._M_impl, {}); + } + else if (_M_alloc == __other._M_alloc) + { + _M_impl = std::__exchange(__other._M_impl, {}); + } + } + + basic_stacktrace& + operator=(const basic_stacktrace& __other) noexcept + { + if (std::__addressof(__other) == this) + return *this; + + constexpr bool __pocca + = _AllocTraits::propagate_on_container_copy_assignment::value; + constexpr bool __always_eq = _AllocTraits::is_always_equal::value; + + const auto __s = __other.size(); + + if constexpr (!__always_eq && __pocca) + { + if (_M_alloc != __other._M_alloc) + { + // Cannot keep the same storage, so deallocate it now. + _M_clear(); + } + } + + if (_M_impl._M_capacity < __s) + { + // Need to allocate new storage. + _M_clear(); + + // Use the allocator we will have after this function returns. + auto& __alloc = __pocca ? __other._M_alloc : _M_alloc; + if (auto __f = _M_impl._M_allocate(__alloc, __s)) + { + std::uninitialized_copy_n(__other.begin(), __s, __f); + _M_impl._M_size = __s; + } + } + else + { + // Current storage is large enough and can be freed by whichever + // allocator we will have after this function returns. + auto __to = std::copy_n(__other.begin(), __s, begin()); + std::destroy(__to, end()); + _M_impl._M_size = __s; + } + + if constexpr (__pocca) + _M_alloc = __other._M_alloc; + + return *this; + } + + basic_stacktrace& + operator=(basic_stacktrace&& __other) noexcept + { + if (std::__addressof(__other) == this) + return *this; + + constexpr bool __pocma + = _AllocTraits::propagate_on_container_move_assignment::value; + + if constexpr (_AllocTraits::is_always_equal::value) + std::swap(_M_impl, __other._M_impl); + else if (_M_alloc == __other._M_alloc) + std::swap(_M_impl, __other._M_impl); + else + { + const auto __s = __other.size(); + + if constexpr (__pocma || _M_impl._M_capacity < __s) + { + // Need to allocate new storage. + _M_clear(); + + // Use the allocator we will have after this function returns. + auto& __alloc = __pocma ? __other._M_alloc : _M_alloc; + if (auto __f = _M_impl._M_allocate(__alloc, __s)) + std::uninitialized_copy_n(__other.begin(), __s, __f); + } + else + { + // Current storage is large enough. + auto __first = __other.begin(); + auto __mid = __first + std::min(__s, _M_impl._M_size); + auto __last = __other.end(); + auto __to = std::copy(__first, __mid, begin()); + __to = std::uninitialized_copy(__mid, __last, __to); + std::destroy(__to, end()); + } + _M_impl._M_size = __s; + } + + if constexpr (__pocma) + _M_alloc = std::move(__other._M_alloc); + + return *this; + } + + constexpr ~basic_stacktrace() + { + _M_clear(); + } + + // [stacktrace.basic.obs], observers + allocator_type get_allocator() const noexcept { return _M_alloc; } + + const_iterator + begin() const noexcept + { return const_iterator{_M_impl._M_frames}; } + + const_iterator + end() const noexcept + { return begin() + size(); } + + const_reverse_iterator + rbegin() const noexcept + { return std::make_reverse_iterator(end()); } + + const_reverse_iterator + rend() const noexcept + { return std::make_reverse_iterator(begin()); } + + const_iterator cbegin() const noexcept { return begin(); } + const_iterator cend() const noexcept { return end(); } + const_reverse_iterator crbegin() const noexcept { return rbegin(); }; + const_reverse_iterator crend() const noexcept { return rend(); }; + + [[nodiscard]] bool empty() const noexcept { return size() == 0; } + size_type size() const noexcept { return _M_impl._M_size; } + size_type max_size() const noexcept { return size_type(-1); } + + const_reference + operator[](size_type __n) const noexcept + { + __glibcxx_assert(__n < size()); + return begin()[__n]; + } + + const_reference + at(size_type __n) const + { + if (__n >= size()) + __throw_out_of_range("basic_stack_trace::at: bad frame number"); + return begin()[__n]; + } + + // [stacktrace.basic.cmp], comparisons + template<typename _Allocator2> + friend bool + operator==(const basic_stacktrace& __x, + const basic_stacktrace<_Allocator2>& __y) noexcept + { return std::equal(__x.begin(), __x.end(), __y.begin(), __y.end()); } + + template<typename _Allocator2> + friend strong_ordering + operator<=>(const basic_stacktrace& __x, + const basic_stacktrace<_Allocator2>& __y) noexcept + { + if (auto __s = __x.size() <=> __y.size(); __s != 0) + return __s; + return std::lexicographical_compare_three_way(__x.begin(), __x.end(), + __y.begin(), __y.end()); + } + + // [stacktrace.basic.mod], modifiers + void + swap(basic_stacktrace& __other) noexcept + { + std::swap(_M_impl. __other._M_impl); + if constexpr (_AllocTraits::propagate_on_container_swap::value) + std::swap(_M_alloc, __other._M_alloc); + } + + private: + bool + _M_reserve(size_type __n) noexcept + { + return _M_impl._M_allocate(_M_alloc, __n) != nullptr; + } + + bool + _M_push_back(const value_type& __x) noexcept + { + return _M_impl._M_push_back(_M_alloc, __x); + } + + void + _M_clear() noexcept + { + _M_impl._M_destroy(); + _M_impl._M_deallocate(_M_alloc); + } + + struct _Impl + { + using pointer = typename _AllocTraits::pointer; + + pointer _M_frames = nullptr; + size_type _M_size = 0; + size_type _M_capacity = 0; + + // Precondition: _M_frames == nullptr + pointer + _M_allocate(allocator_type& __alloc, size_type __n) noexcept + { + __try + { + _M_frames = __n ? __alloc.allocate(__n) : nullptr; + _M_capacity = __n; + } + __catch (...) + { + _M_frames = nullptr; + _M_capacity = 0; + } + return _M_frames; + } + + void + _M_deallocate(allocator_type& __alloc) noexcept + { + if (_M_capacity) + { + __alloc.deallocate(_M_frames, _M_capacity); + _M_frames = nullptr; + _M_capacity = 0; + } + } + + void + _M_destroy() noexcept + { + std::destroy_n(_M_frames, _M_size); + _M_size = 0; + } + + bool + _M_push_back(allocator_type& __alloc, + const stacktrace_entry& __f) noexcept + { + if (_M_size == _M_capacity) + { + _Impl __tmp; + if (auto __f = __tmp._M_allocate(__alloc, _M_capacity * 2)) + std::uninitialized_copy_n(_M_frames, _M_size, __f); + else + return false; + _M_deallocate(__alloc); + std::swap(*this, __tmp); + } + stacktrace_entry* __addr = std::to_address(_M_frames + _M_size++); + std::construct_at(__addr, __f); + return true; + } + + }; + + [[no_unique_address]] allocator_type _M_alloc{}; + + _Impl _M_impl{}; + }; + + // basic_stacktrace typedef names + using stacktrace = basic_stacktrace<allocator<stacktrace_entry>>; + + // [stacktrace.basic.nonmem], non-member functions + template<typename _Allocator> + inline void + swap(basic_stacktrace<_Allocator>& __a, basic_stacktrace<_Allocator>& __b) + noexcept(noexcept(__a.swap(__b))) + { __a.swap(__b); } + + template<typename _CharT, typename _Traits> + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const stacktrace_entry& __f) + { + string __desc, __file; + int __line; + if (__f._M_get_info(&__desc, &__file, &__line)) + { + __os.width(4); + __os << __desc << " at " << __file << ':' << __line; + } + return __os; + } + + template<typename _CharT, typename _Traits, typename _Allocator> + inline basic_ostream<_CharT, _Traits>& + operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_stacktrace<_Allocator>& __st) + { + for (stacktrace::size_type __i = 0; __i < __st.size(); ++__i) + { + __os.width(4); + __os << __i << "# " << __st[__i] << '\n'; + } + return __os; + } + + inline string + to_string(const stacktrace_entry& __f) + { + std::ostringstream __os; + __os << __f; + return std::move(__os).str(); + } + + template<typename _Allocator> + string + to_string(const basic_stacktrace<_Allocator>& __st) + { + std::ostringstream __os; + __os << __st; + return std::move(__os).str(); + } + + namespace pmr + { + template<typename _Tp> class polymorphic_allocator; + using stacktrace + = basic_stacktrace<polymorphic_allocator<stacktrace_entry>>; + } + + // [stacktrace.basic.hash], hash support + + template<> + struct hash<stacktrace_entry> + { + size_t + operator()(const stacktrace_entry& __f) const noexcept + { + using __h = hash<stacktrace_entry::native_handle_type>; + return __h()(__f.native_handle()); + } + }; + + template<typename _Allocator> + struct hash<basic_stacktrace<_Allocator>> + { + size_t + operator()(const basic_stacktrace<_Allocator>& __st) const noexcept + { + hash<stacktrace_entry::native_handle_type> __h; + size_t __val = _Hash_impl::hash(__st.size()); + for (const auto& __f : __st) + __val = _Hash_impl::__hash_combine(__h(__f), __val); + return __val; + } + }; + +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace std +#endif // C++23 + +#endif /* _GLIBCXX_STACKTRACE */ diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 7bd32f6..e3afe57 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -312,6 +312,9 @@ #if __cpp_lib_span # define __cpp_lib_spanstream 202106L #endif +#if _GLIBCXX_HAVE_STACKTRACE +# define __cpp_lib_stacktrace 202011L +#endif #define __cpp_lib_string_contains 202011L #if _GLIBCXX_USE_CXX11_ABI // Only supported with cxx11-abi # define __cpp_lib_string_resize_and_overwrite 202110L diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 5cbbf99..a440200 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -253,6 +253,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -264,6 +265,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -308,6 +313,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -363,6 +369,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/po/Makefile.in b/libstdc++-v3/po/Makefile.in index 0d29364..243f3db 100644 --- a/libstdc++-v3/po/Makefile.in +++ b/libstdc++-v3/po/Makefile.in @@ -144,6 +144,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -155,6 +156,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -199,6 +204,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -254,6 +260,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/python/Makefile.in b/libstdc++-v3/python/Makefile.in index 07b5807..9da4b31 100644 --- a/libstdc++-v3/python/Makefile.in +++ b/libstdc++-v3/python/Makefile.in @@ -174,6 +174,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -185,6 +186,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -229,6 +234,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -284,6 +290,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am index 73f685b..71a0da2 100644 --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -28,8 +28,14 @@ else filesystem_dir = endif +if ENABLE_BACKTRACE +backtrace_dir = libbacktrace +else +backtrace_dir = +endif + ## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE. -SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) +SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) $(backtrace_dir) # Cross compiler support. if VTV_CYGMIN @@ -64,6 +70,9 @@ vpath % $(top_srcdir)/src/c++20 if ENABLE_FILESYSTEM_TS vpath % $(top_srcdir)/src/filesystem endif +if ENABLE_BACKTRACE +vpath % $(top_srcdir)/src/libbacktrace +endif if GLIBCXX_LDBL_COMPAT ldbl_compat_sources = compatibility-ldbl.cc diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index fa4b243..429f3d1 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -238,11 +238,12 @@ am__define_uniq_tagged_files = \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = c++98 c++11 c++17 c++20 filesystem +DIST_SUBDIRS = c++98 c++11 c++17 c++20 filesystem libbacktrace ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -254,6 +255,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -298,6 +303,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -353,6 +359,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ @@ -473,7 +480,9 @@ WARN_CXXFLAGS = \ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) @ENABLE_FILESYSTEM_TS_FALSE@filesystem_dir = @ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem -SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) +@ENABLE_BACKTRACE_FALSE@backtrace_dir = +@ENABLE_BACKTRACE_TRUE@backtrace_dir = libbacktrace +SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) $(backtrace_dir) @VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la # Cross compiler support. @@ -993,6 +1002,7 @@ vpath % $(top_srcdir)/src/c++11 vpath % $(top_srcdir)/src/c++17 vpath % $(top_srcdir)/src/c++20 @ENABLE_FILESYSTEM_TS_TRUE@vpath % $(top_srcdir)/src/filesystem +@ENABLE_BACKTRACE_TRUE@vpath % $(top_srcdir)/src/libbacktrace @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.lo: compatibility-ldbl.cc @GLIBCXX_LDBL_COMPAT_TRUE@ $(LTCXXCOMPILE64) $(LONG_DOUBLE_COMPAT_FLAGS) -c $< @GLIBCXX_LDBL_COMPAT_TRUE@compatibility-ldbl.o: compatibility-ldbl.cc diff --git a/libstdc++-v3/src/c++11/Makefile.in b/libstdc++-v3/src/c++11/Makefile.in index d20d1ed..892c505 100644 --- a/libstdc++-v3/src/c++11/Makefile.in +++ b/libstdc++-v3/src/c++11/Makefile.in @@ -210,6 +210,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -221,6 +222,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -265,6 +270,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -320,6 +326,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/c++17/Makefile.in b/libstdc++-v3/src/c++17/Makefile.in index 83d8490..b88917e 100644 --- a/libstdc++-v3/src/c++17/Makefile.in +++ b/libstdc++-v3/src/c++17/Makefile.in @@ -190,6 +190,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -201,6 +202,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -245,6 +250,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -300,6 +306,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/c++20/Makefile.in b/libstdc++-v3/src/c++20/Makefile.in index 5f0acb4..197d75b 100644 --- a/libstdc++-v3/src/c++20/Makefile.in +++ b/libstdc++-v3/src/c++20/Makefile.in @@ -185,6 +185,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -196,6 +197,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -240,6 +245,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -295,6 +301,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/c++98/Makefile.in b/libstdc++-v3/src/c++98/Makefile.in index 12c6f2d..90eff5d 100644 --- a/libstdc++-v3/src/c++98/Makefile.in +++ b/libstdc++-v3/src/c++98/Makefile.in @@ -206,6 +206,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -217,6 +218,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -261,6 +266,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -316,6 +322,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/filesystem/Makefile.in b/libstdc++-v3/src/filesystem/Makefile.in index e0693b1..8986b42 100644 --- a/libstdc++-v3/src/filesystem/Makefile.in +++ b/libstdc++-v3/src/filesystem/Makefile.in @@ -214,6 +214,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -225,6 +226,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -269,6 +274,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -324,6 +330,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am new file mode 100644 index 0000000..3a31951 --- /dev/null +++ b/libstdc++-v3/src/libbacktrace/Makefile.am @@ -0,0 +1,101 @@ +# Makefile.am -- Backtrace in libstdc++ Makefile. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: + +# (1) Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. + +# (2) Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. + +# (3) The name of the author may not be used to +# endorse or promote products derived from this software without +# specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +include $(top_srcdir)/fragment.am + +toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la + +ACLOCAL_AMFLAGS = -I ../.. -I ../../config + +AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ + -I ../../../libgcc -I .. -I $(top_srcdir) \ + -I $(top_srcdir)/../libbacktrace \ + -include $(top_srcdir)/src/libbacktrace/backtrace-rename.h \ + $(BACKTRACE_CPPFLAGS) + +WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ + -Wcast-qual -Werror +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 = $(C_WARN_FLAGS) +AM_CFLAGS += $(EXTRA_CFLAGS) +AM_CXXFLAGS = $(CXX_WARN_FLAGS) -fno-rtti -fno-exceptions +AM_CXXFLAGS += $(EXTRA_CXXFLAGS) + +libstdc___libbacktrace_la_SOURCES = \ + ../../../libbacktrace/backtrace.h \ + ../../../libbacktrace/atomic.c \ + ../../../libbacktrace/dwarf.c \ + ../../../libbacktrace/fileline.c \ + ../../../libbacktrace/internal.h \ + ../../../libbacktrace/posix.c \ + ../../../libbacktrace/sort.c \ + ../../../libbacktrace/simple.c \ + ../../../libbacktrace/state.c \ + ../../../libiberty/cp-demangle.c + +FORMAT_FILES = \ + ../../../libbacktrace/elf.c \ + ../../../libbacktrace/unknown.c + +VIEW_FILES = \ + ../../../libbacktrace/read.c \ + ../../../libbacktrace/mmapio.c + +ALLOC_FILES = \ + ../../../libbacktrace/alloc.c \ + ../../../libbacktrace/mmap.c + +EXTRA_libstdc___libbacktrace_la_SOURCES = \ + $(FORMAT_FILES) \ + $(VIEW_FILES) \ + $(ALLOC_FILES) + +libstdc___libbacktrace_la_LIBADD = \ + $(FORMAT_FILE) \ + $(VIEW_FILE) \ + $(ALLOC_FILE) + +libstdc___libbacktrace_la_DEPENDENCIES = $(libstdc___libbacktrace_la_LIBADD) + +LTCOMPILE = \ + $(LIBTOOL) --tag CC --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) + +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) + +LINK = \ + $(LIBTOOL) --tag CC --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CC) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CFLAGS) $(LTLDFLAGS) -o $@ diff --git a/libstdc++-v3/src/libbacktrace/Makefile.in b/libstdc++-v3/src/libbacktrace/Makefile.in new file mode 100644 index 0000000..35e5eff --- /dev/null +++ b/libstdc++-v3/src/libbacktrace/Makefile.in @@ -0,0 +1,860 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am -- Backtrace in libstdc++ Makefile. +# Copyright (C) 2012-2013 Free Software Foundation, Inc. + +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: + +# (1) Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. + +# (2) Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. + +# (3) The name of the author may not be used to +# endorse or promote products derived from this software without +# specific prior written permission. + +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/libbacktrace +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ + $(top_srcdir)/../config/enable.m4 \ + $(top_srcdir)/../config/futex.m4 \ + $(top_srcdir)/../config/hwcaps.m4 \ + $(top_srcdir)/../config/iconv.m4 \ + $(top_srcdir)/../config/lead-dot.m4 \ + $(top_srcdir)/../config/lib-ld.m4 \ + $(top_srcdir)/../config/lib-link.m4 \ + $(top_srcdir)/../config/lib-prefix.m4 \ + $(top_srcdir)/../config/lthostflags.m4 \ + $(top_srcdir)/../config/multi.m4 \ + $(top_srcdir)/../config/no-executables.m4 \ + $(top_srcdir)/../config/override.m4 \ + $(top_srcdir)/../config/stdint.m4 \ + $(top_srcdir)/../config/toolexeclibdir.m4 \ + $(top_srcdir)/../config/unwind_ipinfo.m4 \ + $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \ + $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \ + $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/crossconfig.m4 \ + $(top_srcdir)/linkage.m4 $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/../config/gc++filt.m4 \ + $(top_srcdir)/../config/tls.m4 $(top_srcdir)/../config/gthr.m4 \ + $(top_srcdir)/../config/cet.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +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) +am__DEPENDENCIES_1 = +am_libstdc___libbacktrace_la_OBJECTS = atomic.lo dwarf.lo fileline.lo \ + posix.lo sort.lo simple.lo state.lo cp-demangle.lo +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_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = +am__depfiles_maybe = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +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) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ +ACLOCAL = @ACLOCAL@ +ALLOCATOR_H = @ALLOCATOR_H@ +ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +ATOMICITY_SRCDIR = @ATOMICITY_SRCDIR@ +ATOMIC_FLAGS = @ATOMIC_FLAGS@ +ATOMIC_WORD_SRCDIR = @ATOMIC_WORD_SRCDIR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ +BASIC_FILE_CC = @BASIC_FILE_CC@ +BASIC_FILE_H = @BASIC_FILE_H@ +CC = @CC@ +CCODECVT_CC = @CCODECVT_CC@ +CCOLLATE_CC = @CCOLLATE_CC@ +CCTYPE_CC = @CCTYPE_CC@ +CFLAGS = @CFLAGS@ +CLOCALE_CC = @CLOCALE_CC@ +CLOCALE_H = @CLOCALE_H@ +CLOCALE_INTERNAL_H = @CLOCALE_INTERNAL_H@ +CMESSAGES_CC = @CMESSAGES_CC@ +CMESSAGES_H = @CMESSAGES_H@ +CMONEY_CC = @CMONEY_CC@ +CNUMERIC_CC = @CNUMERIC_CC@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CPU_DEFINES_SRCDIR = @CPU_DEFINES_SRCDIR@ +CPU_OPT_BITS_RANDOM = @CPU_OPT_BITS_RANDOM@ +CPU_OPT_EXT_RANDOM = @CPU_OPT_EXT_RANDOM@ +CSTDIO_H = @CSTDIO_H@ +CTIME_CC = @CTIME_CC@ +CTIME_H = @CTIME_H@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXFILT = @CXXFILT@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +C_INCLUDE_DIR = @C_INCLUDE_DIR@ +DBLATEX = @DBLATEX@ +DEBUG_FLAGS = @DEBUG_FLAGS@ +DEFS = @DEFS@ +DOT = @DOT@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ERROR_CONSTANTS_SRCDIR = @ERROR_CONSTANTS_SRCDIR@ +EXEEXT = @EXEEXT@ +EXTRA_CFLAGS = @EXTRA_CFLAGS@ +EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ +FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ +FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ +GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ +GLIBCXX_LIBS = @GLIBCXX_LIBS@ +GREP = @GREP@ +HWCAP_CFLAGS = @HWCAP_CFLAGS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBICONV = @LIBICONV@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LONG_DOUBLE_128_FLAGS = @LONG_DOUBLE_128_FLAGS@ +LONG_DOUBLE_ALT128_COMPAT_FLAGS = @LONG_DOUBLE_ALT128_COMPAT_FLAGS@ +LONG_DOUBLE_COMPAT_FLAGS = @LONG_DOUBLE_COMPAT_FLAGS@ +LTLIBICONV = @LTLIBICONV@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@ +OPT_LDFLAGS = @OPT_LDFLAGS@ +OS_INC_SRCDIR = @OS_INC_SRCDIR@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PDFLATEX = @PDFLATEX@ +RANLIB = @RANLIB@ +SECTION_FLAGS = @SECTION_FLAGS@ +SECTION_LDFLAGS = @SECTION_LDFLAGS@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYMVER_FILE = @SYMVER_FILE@ +TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ +USE_NLS = @USE_NLS@ +VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ +VTV_CXXFLAGS = @VTV_CXXFLAGS@ +VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ +VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ +WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ + -Wcast-qual -Werror + +XMLCATALOG = @XMLCATALOG@ +XMLLINT = @XMLLINT@ +XSLTPROC = @XSLTPROC@ +XSL_STYLE_DIR = @XSL_STYLE_DIR@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +baseline_dir = @baseline_dir@ +baseline_subdir_switch = @baseline_subdir_switch@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +check_msgfmt = @check_msgfmt@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_shared = @enable_shared@ +enable_static = @enable_static@ +exec_prefix = @exec_prefix@ +get_gcc_base_ver = @get_gcc_base_ver@ +glibcxx_MOFILES = @glibcxx_MOFILES@ +glibcxx_PCHFLAGS = @glibcxx_PCHFLAGS@ +glibcxx_POFILES = @glibcxx_POFILES@ +glibcxx_builddir = @glibcxx_builddir@ +glibcxx_compiler_pic_flag = @glibcxx_compiler_pic_flag@ +glibcxx_compiler_shared_flag = @glibcxx_compiler_shared_flag@ +glibcxx_cxx98_abi = @glibcxx_cxx98_abi@ +glibcxx_localedir = @glibcxx_localedir@ +glibcxx_lt_pic_flag = @glibcxx_lt_pic_flag@ +glibcxx_prefixdir = @glibcxx_prefixdir@ +glibcxx_srcdir = @glibcxx_srcdir@ +glibcxx_toolexecdir = @glibcxx_toolexecdir@ +glibcxx_toolexeclibdir = @glibcxx_toolexeclibdir@ +gxx_include_dir = @gxx_include_dir@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +libtool_VERSION = @libtool_VERSION@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lt_host_flags = @lt_host_flags@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +multi_basedir = @multi_basedir@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +port_specific_symbol_files = @port_specific_symbol_files@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +python_mod_dir = @python_mod_dir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +thread_header = @thread_header@ +tmake_file = @tmake_file@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +toplevel_builddir = @toplevel_builddir@ +toplevel_srcdir = @toplevel_srcdir@ + +# May be used by various substitution variables. +gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) +MAINT_CHARSET = latin1 +mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs +PWD_COMMAND = $${PWDCMD-pwd} +STAMP = echo timestamp > +toolexecdir = $(glibcxx_toolexecdir) +toolexeclibdir = $(glibcxx_toolexeclibdir) +@ENABLE_WERROR_FALSE@WERROR_FLAG = +@ENABLE_WERROR_TRUE@WERROR_FLAG = -Werror +@ENABLE_EXTERN_TEMPLATE_FALSE@XTEMPLATE_FLAGS = +@ENABLE_EXTERN_TEMPLATE_TRUE@XTEMPLATE_FLAGS = -fno-implicit-templates +@GLIBCXX_LDBL_ALT128_COMPAT_FALSE@LDBL_128_FLAGS = +@GLIBCXX_LDBL_ALT128_COMPAT_TRUE@LDBL_128_FLAGS = $(LONG_DOUBLE_128_FLAGS) + +# These bits are all figured out from configure. Look in acinclude.m4 +# or configure.ac to see how they are set. See GLIBCXX_EXPORT_FLAGS. +CONFIG_CXXFLAGS = \ + $(SECTION_FLAGS) $(HWCAP_CFLAGS) -frandom-seed=$@ $(LDBL_128_FLAGS) + +WARN_CXXFLAGS = \ + $(WARN_FLAGS) $(WERROR_FLAG) -fdiagnostics-show-location=once + +AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ + -I ../../../libgcc -I .. -I $(top_srcdir) \ + -I $(top_srcdir)/../libbacktrace \ + -include $(top_srcdir)/src/libbacktrace/backtrace-rename.h \ + $(BACKTRACE_CPPFLAGS) + +toolexeclib_LTLIBRARIES = libstdc++_libbacktrace.la +ACLOCAL_AMFLAGS = -I ../.. -I ../../config +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 = $(C_WARN_FLAGS) $(EXTRA_CFLAGS) +AM_CXXFLAGS = $(CXX_WARN_FLAGS) -fno-rtti -fno-exceptions \ + $(EXTRA_CXXFLAGS) +libstdc___libbacktrace_la_SOURCES = \ + ../../../libbacktrace/backtrace.h \ + ../../../libbacktrace/atomic.c \ + ../../../libbacktrace/dwarf.c \ + ../../../libbacktrace/fileline.c \ + ../../../libbacktrace/internal.h \ + ../../../libbacktrace/posix.c \ + ../../../libbacktrace/sort.c \ + ../../../libbacktrace/simple.c \ + ../../../libbacktrace/state.c \ + ../../../libiberty/cp-demangle.c + +FORMAT_FILES = \ + ../../../libbacktrace/elf.c \ + ../../../libbacktrace/unknown.c + +VIEW_FILES = \ + ../../../libbacktrace/read.c \ + ../../../libbacktrace/mmapio.c + +ALLOC_FILES = \ + ../../../libbacktrace/alloc.c \ + ../../../libbacktrace/mmap.c + +EXTRA_libstdc___libbacktrace_la_SOURCES = \ + $(FORMAT_FILES) \ + $(VIEW_FILES) \ + $(ALLOC_FILES) + +libstdc___libbacktrace_la_LIBADD = \ + $(FORMAT_FILE) \ + $(VIEW_FILE) \ + $(ALLOC_FILE) + +libstdc___libbacktrace_la_DEPENDENCIES = $(libstdc___libbacktrace_la_LIBADD) +LTCOMPILE = \ + $(LIBTOOL) --tag CC --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(TOPLEVEL_INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) $(EXTRA_CFLAGS) + +LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) +LINK = \ + $(LIBTOOL) --tag CC --tag disable-shared \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CC) \ + $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CFLAGS) $(LTLDFLAGS) -o $@ + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/fragment.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign --ignore-deps src/libbacktrace/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign --ignore-deps src/libbacktrace/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; +$(top_srcdir)/fragment.am $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(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)'; \ + 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) -rpath $(toolexeclibdir) $(libstdc___libbacktrace_la_OBJECTS) $(libstdc___libbacktrace_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +.c.o: + $(AM_V_CC)$(COMPILE) -c -o $@ $< + +.c.obj: + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< + +atomic.lo: ../../../libbacktrace/atomic.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o atomic.lo `test -f '../../../libbacktrace/atomic.c' || echo '$(srcdir)/'`../../../libbacktrace/atomic.c + +dwarf.lo: ../../../libbacktrace/dwarf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o dwarf.lo `test -f '../../../libbacktrace/dwarf.c' || echo '$(srcdir)/'`../../../libbacktrace/dwarf.c + +fileline.lo: ../../../libbacktrace/fileline.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fileline.lo `test -f '../../../libbacktrace/fileline.c' || echo '$(srcdir)/'`../../../libbacktrace/fileline.c + +posix.lo: ../../../libbacktrace/posix.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix.lo `test -f '../../../libbacktrace/posix.c' || echo '$(srcdir)/'`../../../libbacktrace/posix.c + +sort.lo: ../../../libbacktrace/sort.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sort.lo `test -f '../../../libbacktrace/sort.c' || echo '$(srcdir)/'`../../../libbacktrace/sort.c + +simple.lo: ../../../libbacktrace/simple.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o simple.lo `test -f '../../../libbacktrace/simple.c' || echo '$(srcdir)/'`../../../libbacktrace/simple.c + +state.lo: ../../../libbacktrace/state.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o state.lo `test -f '../../../libbacktrace/state.c' || echo '$(srcdir)/'`../../../libbacktrace/state.c + +cp-demangle.lo: ../../../libiberty/cp-demangle.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cp-demangle.lo `test -f '../../../libiberty/cp-demangle.c' || echo '$(srcdir)/'`../../../libiberty/cp-demangle.c + +elf.lo: ../../../libbacktrace/elf.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o elf.lo `test -f '../../../libbacktrace/elf.c' || echo '$(srcdir)/'`../../../libbacktrace/elf.c + +unknown.lo: ../../../libbacktrace/unknown.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o unknown.lo `test -f '../../../libbacktrace/unknown.c' || echo '$(srcdir)/'`../../../libbacktrace/unknown.c + +read.lo: ../../../libbacktrace/read.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read.lo `test -f '../../../libbacktrace/read.c' || echo '$(srcdir)/'`../../../libbacktrace/read.c + +mmapio.lo: ../../../libbacktrace/mmapio.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmapio.lo `test -f '../../../libbacktrace/mmapio.c' || echo '$(srcdir)/'`../../../libbacktrace/mmapio.c + +alloc.lo: ../../../libbacktrace/alloc.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alloc.lo `test -f '../../../libbacktrace/alloc.c' || echo '$(srcdir)/'`../../../libbacktrace/alloc.c + +mmap.lo: ../../../libbacktrace/mmap.c + $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mmap.lo `test -f '../../../libbacktrace/mmap.c' || echo '$(srcdir)/'`../../../libbacktrace/mmap.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +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 +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-toolexeclibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-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-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 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 + + +# 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/backtrace-rename.h b/libstdc++-v3/src/libbacktrace/backtrace-rename.h new file mode 100644 index 0000000..7a59f16 --- /dev/null +++ b/libstdc++-v3/src/libbacktrace/backtrace-rename.h @@ -0,0 +1,41 @@ +/* Ensure we don't pollute application namespace. */ +#define backtrace_alloc __glibcxx_backtrace_alloc +#define backtrace_close __glibcxx_backtrace_close +#define backtrace_create_state __glibcxx_backtrace_create_state +#define backtrace_dwarf_add __glibcxx_backtrace_dwarf_add +#define backtrace_free __glibcxx_backtrace_free +#define backtrace_get_view __glibcxx_backtrace_get_view +#define backtrace_initialize __glibcxx_backtrace_initialize +#define backtrace_open __glibcxx_backtrace_open +#define backtrace_pcinfo __glibcxx_backtrace_pcinfo +#define backtrace_qsort __glibcxx_backtrace_qsort +#define backtrace_release_view __glibcxx_backtrace_release_view +#define backtrace_simple __glibcxx_backtrace_simple +#define backtrace_state __glibcxx_backtrace_state +#define backtrace_syminfo __glibcxx_backtrace_syminfo +#define backtrace_uncompress_lzma __glibcxx_backtrace_uncompress_lzma +#define backtrace_uncompress_zdebug __glibcxx_backtrace_uncompress_zdebug +#define backtrace_vector_finish __glibcxx_backtrace_vector_finish +#define backtrace_vector_grow __glibcxx_backtrace_vector_grow +#define backtrace_vector_release __glibcxx_backtrace_vector_release +#define backtrace_syminfo_to_full_callback __glibcxx_backtrace_syminfo_to_full_callback +#define backtrace_syminfo_to_full_error_callback __glibcxx_backtrace_syminfo_to_full_error_callback + +#define cplus_demangle_builtin_types __glibcxx_cplus_demangle_builtin_types +#define cplus_demangle_fill_ctor __glibcxx_cplus_demangle_fill_ctor +#define cplus_demangle_fill_dtor __glibcxx_cplus_demangle_fill_dtor +#define cplus_demangle_fill_extended_operator __glibcxx_cplus_demangle_fill_extended_operator +#define cplus_demangle_fill_name __glibcxx_cplus_demangle_fill_name +#define cplus_demangle_init_info __glibcxx_cplus_demangle_init_info +#define cplus_demangle_mangled_name __glibcxx_cplus_demangle_mangled_name +#define cplus_demangle_operators __glibcxx_cplus_demangle_operators +#define cplus_demangle_print __glibcxx_cplus_demangle_print +#define cplus_demangle_print_callback __glibcxx_cplus_demangle_print_callback +#define cplus_demangle_type __glibcxx_cplus_demangle_type +#define cplus_demangle_v3 __glibcxx_cplus_demangle_v3 +#define cplus_demangle_v3_callback __glibcxx_cplus_demangle_v3_callback +#define is_gnu_v3_mangled_ctor __glibcxx_is_gnu_v3_mangled_ctor +#define is_gnu_v3_mangled_dtor __glibcxx_is_gnu_v3_mangled_dtor +#define java_demangle_v3 __glibcxx_java_demangle_v3 +#define java_demangle_v3_callback __glibcxx_java_demangle_v3_callback + diff --git a/libstdc++-v3/src/libbacktrace/backtrace-supported.h.in b/libstdc++-v3/src/libbacktrace/backtrace-supported.h.in new file mode 100644 index 0000000..a9a32d7 --- /dev/null +++ b/libstdc++-v3/src/libbacktrace/backtrace-supported.h.in @@ -0,0 +1,61 @@ +/* backtrace-supported.h.in -- Whether stack backtrace is supported. + Copyright (C) 2012-2013 Free Software Foundation, Inc. + Written by Ian Lance Taylor, Google. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + (1) Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + (2) Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + (3) The name of the author may not be used to + endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. */ + +/* The file backtrace-supported.h.in is used by configure to generate + the file backtrace-supported.h. The file backtrace-supported.h may + be #include'd to see whether the backtrace library will be able to + get a backtrace and produce symbolic information. */ + + +/* BACKTRACE_SUPPORTED will be #define'd as 1 if the backtrace library + should work, 0 if it will not. Libraries may #include this to make + other arrangements. */ + +#define BACKTRACE_SUPPORTED @BACKTRACE_SUPPORTED@ + +/* BACKTRACE_USES_MALLOC will be #define'd as 1 if the backtrace + library will call malloc as it works, 0 if it will call mmap + instead. This may be used to determine whether it is safe to call + the backtrace functions from a signal handler. In general this + only applies to calls like backtrace and backtrace_pcinfo. It does + not apply to backtrace_simple, which never calls malloc. It does + not apply to backtrace_print, which always calls fprintf and + therefore malloc. */ + +#define BACKTRACE_USES_MALLOC @BACKTRACE_USES_MALLOC@ + +/* BACKTRACE_SUPPORTS_THREADS will be #define'd as 1 if the backtrace + library is configured with threading support, 0 if not. If this is + 0, the threaded parameter to backtrace_create_state must be passed + as 0. */ + +#define BACKTRACE_SUPPORTS_THREADS @BACKTRACE_SUPPORTS_THREADS@ diff --git a/libstdc++-v3/src/libbacktrace/config.h.in b/libstdc++-v3/src/libbacktrace/config.h.in new file mode 100644 index 0000000..cdb416e --- /dev/null +++ b/libstdc++-v3/src/libbacktrace/config.h.in @@ -0,0 +1,184 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* ELF size: 32 or 64 */ +#undef BACKTRACE_ELF_SIZE + +/* XCOFF size: 32 or 64 */ +#undef BACKTRACE_XCOFF_SIZE + +/* Define to 1 if you have the __atomic functions */ +#undef HAVE_ATOMIC_FUNCTIONS + +/* Define to 1 if you have the `clock_gettime' function. */ +#undef HAVE_CLOCK_GETTIME + +/* Define to 1 if you have the declaration of `getpagesize', and to 0 if you + don't. */ +#undef HAVE_DECL_GETPAGESIZE + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNLEN + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define if dl_iterate_phdr is available. */ +#undef HAVE_DL_ITERATE_PHDR + +/* Define to 1 if you have the fcntl function */ +#undef HAVE_FCNTL + +/* Define if getexecname is available. */ +#undef HAVE_GETEXECNAME + +/* Define if _Unwind_GetIPInfo is available. */ +#undef HAVE_GETIPINFO + +/* Define to 1 if you have the <inttypes.h> header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have KERN_PROC and KERN_PROC_PATHNAME in <sys/sysctl.h>. + */ +#undef HAVE_KERN_PROC + +/* Define to 1 if you have KERN_PROCARGS and KERN_PROC_PATHNAME in + <sys/sysctl.h>. */ +#undef HAVE_KERN_PROC_ARGS + +/* Define if -llzma is available. */ +#undef HAVE_LIBLZMA + +/* Define to 1 if you have the <link.h> header file. */ +#undef HAVE_LINK_H + +/* Define if AIX loadquery is available. */ +#undef HAVE_LOADQUERY + +/* Define to 1 if you have the `lstat' function. */ +#undef HAVE_LSTAT + +/* Define to 1 if you have the <mach-o/dyld.h> header file. */ +#undef HAVE_MACH_O_DYLD_H + +/* Define to 1 if you have the <memory.h> header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `readlink' function. */ +#undef HAVE_READLINK + +/* Define to 1 if you have the <stdint.h> header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the <stdlib.h> header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the <strings.h> header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the <string.h> header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the __sync functions */ +#undef HAVE_SYNC_FUNCTIONS + +/* Define to 1 if you have the <sys/ldr.h> header file. */ +#undef HAVE_SYS_LDR_H + +/* Define to 1 if you have the <sys/mman.h> header file. */ +#undef HAVE_SYS_MMAN_H + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if -lz is available. */ +#undef HAVE_ZLIB + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* The size of `char', as computed by sizeof. */ +#undef SIZEOF_CHAR + +/* The size of `int', as computed by sizeof. */ +#undef SIZEOF_INT + +/* The size of `long', as computed by sizeof. */ +#undef SIZEOF_LONG + +/* The size of `short', as computed by sizeof. */ +#undef SIZEOF_SHORT + +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE diff --git a/libstdc++-v3/testsuite/20_util/stacktrace/entry.cc b/libstdc++-v3/testsuite/20_util/stacktrace/entry.cc new file mode 100644 index 0000000..0bbcabd --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/stacktrace/entry.cc @@ -0,0 +1,53 @@ +// { dg-options "-std=gnu++23 -lstdc++_libbacktrace" } +// { dg-do run { target c++23 } } +// { dg-require-effective-target stacktrace } + +#include <stacktrace> +#include "testsuite_hooks.h" + +static_assert( std::regular<std::stacktrace_entry> ); +static_assert( std::three_way_comparable<std::stacktrace_entry> ); + +constexpr bool +test_constexpr() +{ + std::stacktrace_entry empty; + VERIFY( !empty ); + VERIFY( empty == empty ); + VERIFY( std::is_eq(empty <=> empty) ); + + std::stacktrace_entry::native_handle_type native = empty.native_handle(); + VERIFY( empty.native_handle() == native ); + + return true; +} +static_assert( test_constexpr() ); + +void +test_members() +{ + std::stacktrace_entry empty; + VERIFY( empty.description().size() == 0 ); + VERIFY( empty.source_file().size() == 0 ); + VERIFY( empty.source_line() == 0 ); + + std::stacktrace_entry e1 = std::stacktrace::current().at(0); + std::stacktrace_entry e2 = std::stacktrace::current().at(0); + VERIFY( e1 != e2 ); + VERIFY( e1.description() == e2.description() ); + VERIFY( e1.source_file() == e2.source_file() ); + VERIFY( e1.source_line() != e2.source_line() ); + + std::stacktrace_entry e3 = []{ + return std::stacktrace::current().at(0); + }(); + VERIFY( e1 != e3 ); + VERIFY( e1.description() != e3.description() ); + VERIFY( e1.source_file() == e3.source_file() ); + VERIFY( e1.source_line() != e3.source_line() ); +} + +int main() +{ + test_constexpr(); +} diff --git a/libstdc++-v3/testsuite/20_util/stacktrace/synopsis.cc b/libstdc++-v3/testsuite/20_util/stacktrace/synopsis.cc new file mode 100644 index 0000000..72582fa --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/stacktrace/synopsis.cc @@ -0,0 +1,46 @@ +// { dg-options "-std=gnu++23" } +// { dg-do compile { target c++23 } } +// { dg-require-effective-target stacktrace } + +#include <stacktrace> + +#ifndef __cpp_lib_stacktrace +# error "Feature-test macro for stacktrace missing in <stacktrace>" +#elif __cpp_lib_stacktrace < 202011L +# error "Feature-test macro for stacktrace has wrong value in <stacktrace>" +#endif + +namespace std +{ + class stacktrace_entry; + + template<class Allocator> + class basic_stacktrace; + + using stacktrace = basic_stacktrace<allocator<stacktrace_entry>>; + + template<class Allocator> + void swap(basic_stacktrace<Allocator>& a, basic_stacktrace<Allocator>& b) + noexcept(noexcept(a.swap(b))); + + string to_string(const stacktrace_entry& f); + + template<class Allocator> + string to_string(const basic_stacktrace<Allocator>& st); + + template<class charT, class traits> + basic_ostream<charT, traits>& + operator<<(basic_ostream<charT, traits>& os, const stacktrace_entry& f); + + template<class charT, class traits, class Allocator> + basic_ostream<charT, traits>& + operator<<(basic_ostream<charT, traits>& os, const basic_stacktrace<Allocator>& st); + + namespace pmr { + using stacktrace = basic_stacktrace<polymorphic_allocator<stacktrace_entry>>; + } + + template<class T> struct hash; + template<> struct hash<stacktrace_entry>; + template<class Allocator> struct hash<basic_stacktrace<Allocator>>; +} diff --git a/libstdc++-v3/testsuite/20_util/stacktrace/version.cc b/libstdc++-v3/testsuite/20_util/stacktrace/version.cc new file mode 100644 index 0000000..ed466be --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/stacktrace/version.cc @@ -0,0 +1,11 @@ +// { dg-options "-std=gnu++23" } +// { dg-do preprocess { target c++23 } } +// { dg-require-effective-target stacktrace } + +#include <version> + +#ifndef __cpp_lib_stacktrace +# error "Feature-test macro for stacktrace missing in <version>" +#elif __cpp_lib_stacktrace < 202011L +# error "Feature-test macro for stacktrace has wrong value in <version>" +#endif diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/Makefile.in index b442dfe..1708060 100644 --- a/libstdc++-v3/testsuite/Makefile.in +++ b/libstdc++-v3/testsuite/Makefile.in @@ -144,6 +144,7 @@ ABI_TWEAKS_SRCDIR = @ABI_TWEAKS_SRCDIR@ ACLOCAL = @ACLOCAL@ ALLOCATOR_H = @ALLOCATOR_H@ ALLOCATOR_NAME = @ALLOCATOR_NAME@ +ALLOC_FILE = @ALLOC_FILE@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ @@ -155,6 +156,10 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BACKTRACE_CPPFLAGS = @BACKTRACE_CPPFLAGS@ +BACKTRACE_SUPPORTED = @BACKTRACE_SUPPORTED@ +BACKTRACE_SUPPORTS_THREADS = @BACKTRACE_SUPPORTS_THREADS@ +BACKTRACE_USES_MALLOC = @BACKTRACE_USES_MALLOC@ BASIC_FILE_CC = @BASIC_FILE_CC@ BASIC_FILE_H = @BASIC_FILE_H@ CC = @CC@ @@ -199,6 +204,7 @@ EXEEXT = @EXEEXT@ EXTRA_CFLAGS = @EXTRA_CFLAGS@ EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@ FGREP = @FGREP@ +FORMAT_FILE = @FORMAT_FILE@ FREESTANDING_FLAGS = @FREESTANDING_FLAGS@ GLIBCXX_INCLUDES = @GLIBCXX_INCLUDES@ GLIBCXX_LIBS = @GLIBCXX_LIBS@ @@ -254,6 +260,7 @@ SYMVER_FILE = @SYMVER_FILE@ TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ +VIEW_FILE = @VIEW_FILE@ VTV_CXXFLAGS = @VTV_CXXFLAGS@ VTV_CXXLINKFLAGS = @VTV_CXXLINKFLAGS@ VTV_PCH_CXXFLAGS = @VTV_PCH_CXXFLAGS@ diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index 273a3da..0debbea 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1346,6 +1346,14 @@ proc check_effective_target_std_allocator_new { } { }] } +# Return 1 if libstdc++ was built as --enable-libstdcxx-backtrace +proc check_effective_target_stacktrace { } { + return [check_v3_target_prop_cached et_stacktrace { + set cond "_GLIBCXX_HAVE_STACKTRACE" + return [v3_check_preprocessor_condition stacktrace $cond] + }] +} + set additional_prunes "" if { [info exists env(GCC_RUNTEST_PARALLELIZE_DIR)] \ |