[PATCH v2] libstdc++: Skip stacktrace symbol checks without debug info [PR128487]

Torbjörn Svensson via Sourceware Forge forge-bot+azoff@forge-stage.sourceware.org
Sat Dec 5 09:18:59 GMT 2026


From: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>

On bare-metal targets, std::stacktrace can't resolve symbol names or
source locations because there's no debug info to read at runtime.
Add a stacktrace_has_syms effective target and only check
description, file and line where it is supported. Elsewhere, check
that the file and line are empty.

Fixes on arm-none-eabi:

FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++29 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++29 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++29 execution test

	PR libstdc++/128487

libstdc++-v3/ChangeLog:

	* testsuite/lib/libstdc++.exp
	(check_effective_target_stacktrace_has_syms): New proc.
	* testsuite/19_diagnostics/stacktrace/entry.cc: Only check
	symbols and source locations for stacktrace_has_syms targets.
	* testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
	* testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
This patch adds a stacktrace_has_syms effective target that checks
whether the symbol name and source location of a frame can be
resolved. The description, file and line checks in the stacktrace
tests now only run on targets where it is supported. Elsewhere, the
tests check that the file and line are empty.

Regtested on arm-none-eabi and x86_64-linux-gnu, using
r17-7187-g3b1a3cf09f06e8 as baseline. x86_64-linux-gnu shows no
difference. On arm-none-eabi, the following failures are gone:

FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++29 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++29 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++29 execution test

Changes since v1:
- Keep libbacktrace enabled for `arm*-*-eabi*` and instead add a
  stacktrace_has_syms effective target, so that the stacktrace tests
  only check symbol names and source locations where they can be
  resolved.

Ok for trunk and releases/gcc-16?

--



This is a forge pull request published on the gcc-patches mailing list mailing list
as requested by Torbjörn Svensson via Sourceware Forge <forge-bot+azoff@forge-stage.sourceware.org>.
Forge discussion: https://forge.sourceware.org/gcc/gcc/pulls/270

Get it locally using:
```
git fetch forge-upstream "+refs/versioned_pull/270/*:refs/versioned_pull/270/*"
git switch -c "pr-270-v2" "refs/versioned_pull/270/2/head"
```
Or, download the patch at: https://forge.sourceware.org/gcc/gcc/pulls/270.diff
Created on: 2026-11-09 06:32:06+00:00
Latest update: 2026-12-05 09:18:58+00:00
Changes: 4 changed files, 88 additions, 5 deletions
Head revision: azoff/gcc ref pr/libbacktrace commit 128c7cf8f31ba129330f9cd6520b71a843ec4af1 
Base revision: gcc/gcc ref trunk commit 3b1a3cf09f06e8526ce8c1c25b2b2511ebf1f165 r17-7187-g3b1a3cf09f06e8
Merge base: 3b1a3cf09f06e8526ce8c1c25b2b2511ebf1f165
Requested Reviewers: rearnsha

Changed files:
- M: libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
- M: libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc
- M: libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
- M: libstdc++-v3/testsuite/lib/libstdc++.exp

 .../19_diagnostics/stacktrace/entry.cc        | 22 +++++++-
 .../19_diagnostics/stacktrace/output.cc       |  6 +-
 .../19_diagnostics/stacktrace/stacktrace.cc   |  9 ++-
 libstdc++-v3/testsuite/lib/libstdc++.exp      | 56 +++++++++++++++++++
 4 files changed, 88 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
index 90671e68f8bf6..41fde2d83afac 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc
@@ -1,6 +1,7 @@
 // { dg-options "-funwind-tables -lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
+// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
 
 #include <stacktrace>
 #include "testsuite_hooks.h"
@@ -33,19 +34,34 @@ test_members()
 
   std::stacktrace_entry e1 = std::stacktrace::current().at(0);
   std::stacktrace_entry e2 = std::stacktrace::current().at(0);
+  VERIFY( e1 );
+  VERIFY( e2 );
   VERIFY( e1 != e2 );
+#ifdef STACKTRACE_HAS_SYMS
   VERIFY( e1.description() == e2.description() );
   VERIFY( e1.source_file() == e2.source_file() );
-  VERIFY( e1.source_line() == (__LINE__ - 5) );
-  VERIFY( e2.source_line() == (__LINE__ - 5) );
+  VERIFY( e1.source_line() == (__LINE__ - 8) );
+  VERIFY( e2.source_line() == (__LINE__ - 8) );
+#else
+  VERIFY( e1.source_file().empty() );
+  VERIFY( e1.source_line() == 0 );
+  VERIFY( e2.source_file().empty() );
+  VERIFY( e2.source_line() == 0 );
+#endif
 
   std::stacktrace_entry e3 = []{
     return std::stacktrace::current().at(0);
   }();
+  VERIFY( e3 );
   VERIFY( e1 != e3 );
+#ifdef STACKTRACE_HAS_SYMS
   VERIFY( e1.description() != e3.description() );
   VERIFY( e1.source_file() == e3.source_file() );
-  VERIFY( e3.source_line() == (__LINE__ - 5) );
+  VERIFY( e3.source_line() == (__LINE__ - 7) );
+#else
+  VERIFY( e3.source_file().empty() );
+  VERIFY( e3.source_line() == 0 );
+#endif
 }
 
 int main()
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc
index ea9da7fa24867..c91809c7ef900 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc
@@ -1,6 +1,7 @@
 // { dg-options "-funwind-tables -lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
+// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
 // { dg-add-options no_pch }
 
 #include <stacktrace>
@@ -18,8 +19,11 @@ test_to_string()
 {
   auto trace = std::stacktrace::current();
   std::string s1 = std::to_string(trace.at(0));
+#ifdef STACKTRACE_HAS_SYMS
   VERIFY( s1.contains("test_to_string()") );
-  VERIFY( s1.contains("output.cc:19") );
+  VERIFY( s1.contains("output.cc:20") );
+#endif
+  VERIFY( s1.contains(std::format("[{:#x}]", trace.at(0).native_handle())) );
   std::string s2 = std::to_string(trace);
   VERIFY( s2.contains(s1) );
 }
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
index ee1a6d221e3ad..8575a7d3ddc12 100644
--- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
+++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc
@@ -1,6 +1,7 @@
 // { dg-options "-funwind-tables -lstdc++exp" }
 // { dg-do run { target c++23 } }
 // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
+// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
 
 #include <stacktrace>
 #include "testsuite_allocator.h"
@@ -281,7 +282,9 @@ test_assign()
     VERIFY( s1 != s0 );
     s0 = s1;
     VERIFY( s0 == s1 );
-    VERIFY( s0.at(0).source_line() == (__LINE__ - 4) );
+#ifdef STACKTRACE_HAS_SYMS
+    VERIFY( s0.at(0).source_line() == (__LINE__ - 5) );
+#endif
 
     s1 = Stacktrace::current();
     VERIFY( s1 != s0 );
@@ -310,13 +313,17 @@ test_assign()
     s1 = Stacktrace::current(Alloc(__LINE__));
     VERIFY( s1 != s0 );
     s0 = std::move(s1);
+#ifdef STACKTRACE_HAS_SYMS
     VERIFY( s0.at(0).source_line() == s0.get_allocator().get_personality() );
+#endif
     VERIFY( s1.empty() ); // ISO C++: valid but unspecified; GCC: empty.
 
     Stacktrace s2 = Stacktrace::current(s0.get_allocator());
     Stacktrace s3 = s2;
     s2 = std::move(s0);
+#ifdef STACKTRACE_HAS_SYMS
     VERIFY( s2.at(0).source_line() == s2.get_allocator().get_personality() );
+#endif
     VERIFY( s0 == s3 ); // ISO C++: valid but unspecified, GCC: swapped.
   }
 
diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp
index 82818191d71a2..4fdd960955a0d 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -983,6 +983,62 @@ proc check_v3_target_fileio { } {
     }]
 }
 
+# Return 1 if std::stacktrace can resolve symbol names and source locations.
+# This is not the case on e.g. bare-metal targets without access to debug info.
+proc check_effective_target_stacktrace_has_syms { } {
+    if {![check_v3_target_cpp_feature_test "__cpp_lib_stacktrace"]} {
+	return 0
+    }
+    return [check_v3_target_prop_cached et_stacktrace_has_syms {
+	global tool
+
+	# Set up, compile, and execute a C++ test program that tries to
+	# resolve the symbol name and source location of its own frame
+	set src stacktrace_has_syms[pid].cc
+	set exe stacktrace_has_syms[pid].x
+
+	set f [open $src "w"]
+	puts $f "#include <stacktrace>"
+	puts $f "int main ()"
+	puts $f "{"
+	puts $f "  const auto line = __LINE__; auto t = std::stacktrace::current(0, 1);"
+	puts $f "  if (t.empty ())"
+	puts $f "    return 1;"
+	puts $f "  const std::stacktrace_entry& e = t\[0\];"
+	puts $f "  if (e.source_line () != line)"
+	puts $f "    return 2;"
+	puts $f "  if (e.source_file ().find (\"$src\") == std::string::npos)"
+	puts $f "    return 3;"
+	puts $f "  if (e.description ().find (\"main\") == std::string::npos)"
+	puts $f "    return 4;"
+	puts $f "  return 0;"
+	puts $f "}"
+	close $f
+
+	set lines [v3_target_compile $src $exe executable \
+		       [list "additional_flags=-std=gnu++23" \
+			    "additional_flags=-funwind-tables" \
+			    "additional_flags=-lstdc++exp"]]
+	file delete $src
+
+	if [string match "" $lines] {
+	    # No error message, compilation succeeded.
+	    set result [${tool}_load "./$exe" "" ""]
+	    set status [lindex $result 0]
+	    remote_file build delete $exe
+
+	    verbose "check_effective_target_stacktrace_has_syms: status is <$status>" 2
+
+	    if { $status == "pass" } {
+		return 1
+	    }
+	} else {
+	    verbose "check_effective_target_stacktrace_has_syms: compilation failed" 2
+	}
+	return 0
+    }]
+}
+
 # Eventually we want C90/C99 determining and switching from this.
 proc check_v3_target_c_std { } {
     return [check_v3_target_prop_cached et_c_std {

Range-diff against v1:
1:  0b5d00be4a315 ! 1:  128c7cf8f31ba libstdc++: Disable libbacktrace by default for arm*-*-eabi* [PR128487]
    @@ Metadata
     Author: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
     
      ## Commit message ##
    -    libstdc++: Disable libbacktrace by default for arm*-*-eabi* [PR128487]
    +    libstdc++: Skip stacktrace symbol checks without debug info [PR128487]
     
    -    Do not enable libbacktrace automatically for arm*-*-eabi* targets.
    +    On bare-metal targets, std::stacktrace can't resolve symbol names or
    +    source locations because there's no debug info to read at runtime.
    +    Add a stacktrace_has_syms effective target and only check
    +    description, file and line where it is supported. Elsewhere, check
    +    that the file and line are empty.
     
    -    libstdc++-v3/ChangeLog:
    +    Fixes on arm-none-eabi:
    +
    +    FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
    +    FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++29 execution test
    +    FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
    +    FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++29 execution test
    +    FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
    +    FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++29 execution test
     
                 PR libstdc++/128487
    -            * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Disable libbacktrace
    -            by default for arm*-*-eabi* targets.
    -            * configure: Regenerate.
    +
    +    libstdc++-v3/ChangeLog:
    +
    +            * testsuite/lib/libstdc++.exp
    +            (check_effective_target_stacktrace_has_syms): New proc.
    +            * testsuite/19_diagnostics/stacktrace/entry.cc: Only check
    +            symbols and source locations for stacktrace_has_syms targets.
    +            * testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
    +            * testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
     
         Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
     
    - ## libstdc++-v3/acinclude.m4 ##
    -@@ libstdc++-v3/acinclude.m4: BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DBACKTRACE_ELF_SIZE=$elfsize"
    -   if test "$enable_libstdcxx_backtrace" = "auto"; then
    -     case "$host" in
    -       avr-*-*) enable_libstdcxx_backtrace=no ;;
    -+      arm*-*-eabi*) enable_libstdcxx_backtrace=no ;;
    -       *) enable_libstdcxx_backtrace="$is_hosted" ;;
    -     esac
    -   fi
    -
    - ## libstdc++-v3/configure ##
    -@@ libstdc++-v3/configure: $as_echo_n "checking whether to build libbacktrace support... " >&6; }
    -   if test "$enable_libstdcxx_backtrace" = "auto"; then
    -     case "$host" in
    -       avr-*-*) enable_libstdcxx_backtrace=no ;;
    -+      arm*-*-eabi*) enable_libstdcxx_backtrace=no ;;
    -       *) enable_libstdcxx_backtrace="$is_hosted" ;;
    -     esac
    -   fi
    + ## libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc ##
    +@@
    + // { dg-options "-funwind-tables -lstdc++exp" }
    + // { dg-do run { target c++23 } }
    + // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
    ++// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
    + 
    + #include <stacktrace>
    + #include "testsuite_hooks.h"
    +@@ libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc: test_members()
    + 
    +   std::stacktrace_entry e1 = std::stacktrace::current().at(0);
    +   std::stacktrace_entry e2 = std::stacktrace::current().at(0);
    ++  VERIFY( e1 );
    ++  VERIFY( e2 );
    +   VERIFY( e1 != e2 );
    ++#ifdef STACKTRACE_HAS_SYMS
    +   VERIFY( e1.description() == e2.description() );
    +   VERIFY( e1.source_file() == e2.source_file() );
    +-  VERIFY( e1.source_line() == (__LINE__ - 5) );
    +-  VERIFY( e2.source_line() == (__LINE__ - 5) );
    ++  VERIFY( e1.source_line() == (__LINE__ - 8) );
    ++  VERIFY( e2.source_line() == (__LINE__ - 8) );
    ++#else
    ++  VERIFY( e1.source_file().empty() );
    ++  VERIFY( e1.source_line() == 0 );
    ++  VERIFY( e2.source_file().empty() );
    ++  VERIFY( e2.source_line() == 0 );
    ++#endif
    + 
    +   std::stacktrace_entry e3 = []{
    +     return std::stacktrace::current().at(0);
    +   }();
    ++  VERIFY( e3 );
    +   VERIFY( e1 != e3 );
    ++#ifdef STACKTRACE_HAS_SYMS
    +   VERIFY( e1.description() != e3.description() );
    +   VERIFY( e1.source_file() == e3.source_file() );
    +-  VERIFY( e3.source_line() == (__LINE__ - 5) );
    ++  VERIFY( e3.source_line() == (__LINE__ - 7) );
    ++#else
    ++  VERIFY( e3.source_file().empty() );
    ++  VERIFY( e3.source_line() == 0 );
    ++#endif
    + }
    + 
    + int main()
    +
    + ## libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc ##
    +@@
    + // { dg-options "-funwind-tables -lstdc++exp" }
    + // { dg-do run { target c++23 } }
    + // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
    ++// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
    + // { dg-add-options no_pch }
    + 
    + #include <stacktrace>
    +@@ libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc: test_to_string()
    + {
    +   auto trace = std::stacktrace::current();
    +   std::string s1 = std::to_string(trace.at(0));
    ++#ifdef STACKTRACE_HAS_SYMS
    +   VERIFY( s1.contains("test_to_string()") );
    +-  VERIFY( s1.contains("output.cc:19") );
    ++  VERIFY( s1.contains("output.cc:20") );
    ++#endif
    ++  VERIFY( s1.contains(std::format("[{:#x}]", trace.at(0).native_handle())) );
    +   std::string s2 = std::to_string(trace);
    +   VERIFY( s2.contains(s1) );
    + }
    +
    + ## libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc ##
    +@@
    + // { dg-options "-funwind-tables -lstdc++exp" }
    + // { dg-do run { target c++23 } }
    + // { dg-require-cpp-feature-test __cpp_lib_stacktrace }
    ++// { dg-additional-options "-DSTACKTRACE_HAS_SYMS" { target stacktrace_has_syms } }
    + 
    + #include <stacktrace>
    + #include "testsuite_allocator.h"
    +@@ libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc: test_assign()
    +     VERIFY( s1 != s0 );
    +     s0 = s1;
    +     VERIFY( s0 == s1 );
    +-    VERIFY( s0.at(0).source_line() == (__LINE__ - 4) );
    ++#ifdef STACKTRACE_HAS_SYMS
    ++    VERIFY( s0.at(0).source_line() == (__LINE__ - 5) );
    ++#endif
    + 
    +     s1 = Stacktrace::current();
    +     VERIFY( s1 != s0 );
    +@@ libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc: test_assign()
    +     s1 = Stacktrace::current(Alloc(__LINE__));
    +     VERIFY( s1 != s0 );
    +     s0 = std::move(s1);
    ++#ifdef STACKTRACE_HAS_SYMS
    +     VERIFY( s0.at(0).source_line() == s0.get_allocator().get_personality() );
    ++#endif
    +     VERIFY( s1.empty() ); // ISO C++: valid but unspecified; GCC: empty.
    + 
    +     Stacktrace s2 = Stacktrace::current(s0.get_allocator());
    +     Stacktrace s3 = s2;
    +     s2 = std::move(s0);
    ++#ifdef STACKTRACE_HAS_SYMS
    +     VERIFY( s2.at(0).source_line() == s2.get_allocator().get_personality() );
    ++#endif
    +     VERIFY( s0 == s3 ); // ISO C++: valid but unspecified, GCC: swapped.
    +   }
    + 
    +
    + ## libstdc++-v3/testsuite/lib/libstdc++.exp ##
    +@@ libstdc++-v3/testsuite/lib/libstdc++.exp: proc check_v3_target_fileio { } {
    +     }]
    + }
    + 
    ++# Return 1 if std::stacktrace can resolve symbol names and source locations.
    ++# This is not the case on e.g. bare-metal targets without access to debug info.
    ++proc check_effective_target_stacktrace_has_syms { } {
    ++    if {![check_v3_target_cpp_feature_test "__cpp_lib_stacktrace"]} {
    ++	return 0
    ++    }
    ++    return [check_v3_target_prop_cached et_stacktrace_has_syms {
    ++	global tool
    ++
    ++	# Set up, compile, and execute a C++ test program that tries to
    ++	# resolve the symbol name and source location of its own frame
    ++	set src stacktrace_has_syms[pid].cc
    ++	set exe stacktrace_has_syms[pid].x
    ++
    ++	set f [open $src "w"]
    ++	puts $f "#include <stacktrace>"
    ++	puts $f "int main ()"
    ++	puts $f "{"
    ++	puts $f "  const auto line = __LINE__; auto t = std::stacktrace::current(0, 1);"
    ++	puts $f "  if (t.empty ())"
    ++	puts $f "    return 1;"
    ++	puts $f "  const std::stacktrace_entry& e = t\[0\];"
    ++	puts $f "  if (e.source_line () != line)"
    ++	puts $f "    return 2;"
    ++	puts $f "  if (e.source_file ().find (\"$src\") == std::string::npos)"
    ++	puts $f "    return 3;"
    ++	puts $f "  if (e.description ().find (\"main\") == std::string::npos)"
    ++	puts $f "    return 4;"
    ++	puts $f "  return 0;"
    ++	puts $f "}"
    ++	close $f
    ++
    ++	set lines [v3_target_compile $src $exe executable \
    ++		       [list "additional_flags=-std=gnu++23" \
    ++			    "additional_flags=-funwind-tables" \
    ++			    "additional_flags=-lstdc++exp"]]
    ++	file delete $src
    ++
    ++	if [string match "" $lines] {
    ++	    # No error message, compilation succeeded.
    ++	    set result [${tool}_load "./$exe" "" ""]
    ++	    set status [lindex $result 0]
    ++	    remote_file build delete $exe
    ++
    ++	    verbose "check_effective_target_stacktrace_has_syms: status is <$status>" 2
    ++
    ++	    if { $status == "pass" } {
    ++		return 1
    ++	    }
    ++	} else {
    ++	    verbose "check_effective_target_stacktrace_has_syms: compilation failed" 2
    ++	}
    ++	return 0
    ++    }]
    ++}
    ++
    + # Eventually we want C90/C99 determining and switching from this.
    + proc check_v3_target_c_std { } {
    +     return [check_v3_target_prop_cached et_c_std {
-- 
2.56.0



More information about the Libstdc++ mailing list