On Mon, 9 Nov 2026 at 09:25, Torbjorn SVENSSON <[email protected]> wrote: > > > > On 2026-11-09 10:17, Jonathan Wakely wrote: > > On Mon, 9 Nov 2026 at 06:37, Torbjörn Svensson via Sourceware Forge > > <[email protected]> wrote: > >> > >> 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? > > > > No objection from me if the target maintainers think std::stacktrace > > is not useful on the target. But if it's just missing support in > > libbacktrace or that we need some target-specific adjustment in the > > libstdc++ code, we should do that instead. > > > > Thanks Jonathan. > I'll wait for Richard E. to reply on this. > > Regarding adding support to libbacktrace; I agree that this would be a > better approach, but I can not find any way to do this that would make > sense in an embedded context. It would mean that the dwarf content > needs to be placed in flash and that would be an expensive operation > since flash is generally a very constrained resource. > While it's probably doable for the test, I do not see that this would > ever be used in a non-artificial scenario.
The std::stacktrace object still gives you a list of addresses, which can be turned into symbolic information independent of the process, e.g. when analyzing a log file after the process has exited. But none of the libstdc++ tests will PASS without the symbol information available at runtime.
