From: Torbjörn SVENSSON <[email protected]>

Do not enable libbacktrace automatically for arm*-*-eabi* targets.

libstdc++-v3/ChangeLog:

        PR libstdc++/128487
        * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Disable libbacktrace
        by default for arm*-*-eabi* targets.
        * configure: Regenerate.

Signed-off-by: Torbjörn SVENSSON <[email protected]>
---
This patch disables automatic building of libbacktrace for arm*-*-eabi* 
targets. It can still be enabled explicitly with --enable-libstdcxx-backtrace.

With libbacktrace disabled, the stacktrace tests are reported as unsupported. 
This avoids the following runtime failures on all tested arm-none-eabi 
configurations:

- 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

Regtested on arm-none-eabi, using r17-5743-ge33129b871c302 as baseline.

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 
<[email protected]>.
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-v1" "refs/versioned_pull/270/1/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-11-09 06:36:18+00:00
Changes: 2 changed files, 2 additions, 0 deletions
Head revision: azoff/gcc ref pr/libbacktrace commit 
0b5d00be4a315918193db7c305cbaf01d0bec214 
Base revision: gcc/gcc ref trunk commit 
e33129b871c30276acfaed2b435ae5b505b73655 r17-5743-ge33129b871c302
Merge base: e33129b871c30276acfaed2b435ae5b505b73655
Requested Reviewers: 

Changed files:
- M: libstdc++-v3/acinclude.m4
- M: libstdc++-v3/configure

 libstdc++-v3/acinclude.m4 | 1 +
 libstdc++-v3/configure    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 8b4ccc1e692da..150cb58fe4867 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -5435,6 +5435,7 @@ 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
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index f98e54607ab39..6e6163111c00d 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -53915,6 +53915,7 @@ $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
-- 
2.56.0

Reply via email to