GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
sparc

sparc: Enable async unwind tables by default on sparc64 Linux

Default unwind tables are now enabled for sparc64 Linux, improving backtrace reliability.

This change enables -fasynchronous-unwind-tables and -funwind-tables by default for the sparc64 Linux target. This ensures that glibc’s backtrace() function can reliably traverse the call stack using the libgcc unwinder, preventing backtraces from stopping prematurely at the first frame. This aligns sparc64 with other architectures like aarch64 and riscv that already have this behavior enabled by default.

In Details

This commit modifies gcc/config.gcc and gcc/common/config/sparc/sparc-common.cc to define TARGET_DEFAULT_ASYNC_UNWIND_TABLES for sparc64-*-linux* targets. This flag enables the -fasynchronous-unwind-tables and -funwind-tables options by default. This is crucial for glibc's backtrace() on SPARC, which relies on the libgcc unwinder; without these tables, unwinding stops at the first frame. Enabling them by default mirrors the behavior on other ABIs like aarch64 and RISC-V.

For Context
unwind tables
Data structures generated by the compiler that describe how to reconstruct the call stack. They contain information about stack frame layout and register saving conventions.
-fasynchronous-unwind-tables
A GCC flag that instructs the compiler to emit unwind information in a way that does not require the program to be stopped to be usable. This is essential for features like efficient backtraces and exception handling.
-funwind-tables
A GCC flag that enables the generation of unwind tables. These tables are used by runtime libraries to perform stack unwinding.
libgcc unwinder
The unwinding mechanism provided by GCC's runtime library (libgcc). It uses the generated unwind tables to traverse the call stack.
backtrace()
A standard C library function (often found in glibc) that returns a backtrace, which is a list of function calls that led to the current point in the program's execution.
call stack
A data structure used by a running program to keep track of active function calls. Each function call adds a 'stack frame' to the top of the stack.
Filed Under: sparc64unwindinglibgccbacktrace