]> git.ipfire.org Git - thirdparty/gcc.git/commit
[PATCH] ia64: properly include libunwind support during configuration
authorXinhui Yang <cyan@cyano.uk>
Wed, 7 Jan 2026 15:59:01 +0000 (08:59 -0700)
committerJeff Law <jeffrey.law@oss.qualcomm.com>
Wed, 7 Jan 2026 15:59:34 +0000 (08:59 -0700)
commitbb9cb9c7c0abb3bad257322f55b60293b7fecf27
treef6c16f4b69196a61ec85075f4db0aeaadb945979
parentfadfce9956a2cd2f73f07dee8e5e97c8af78ae75
[PATCH] ia64: properly include libunwind support during configuration

By using the test `with_system_libunwind', libgcc can use either
in-house implementation or reference external libunwind symbols.
However, this breaks the static libgcc.a library, as in t-linux it
references unwind-compat.c, which turns some _Unwind_* symbols into
references of the corresponding symbols in libunwind, but libunwind does
not exist in some conditions (e.g. bootstrapping a toolchain). The
linker complains about `missing version node for symbol', since it can
not find the symbol it is referring to.

The unwind-compat.c module should only exist, if system libunwind is
being used. Also GCC itself should add -lunwind only if this condition
is met, too.

Implementing better control for whether to embed unwind implementation
into libgcc to fix this issue.

gcc/
* config.gcc: limit -lunwind usage by testing if the system
libunwind is being used.

libgcc/
* config.host (ia64): include unwind-compat only if the system
libunwind is being used.

* config/ia64/t-linux-libunwind: include libgcc symver definition
for libgcc symbols, since it bears the same role as t-linux
(except libunwind); Include fde-glibc.c since the unwind
implementation requires _Unwind_FindTableEntry in this file.

* config/ia64/unwind-ia64.c: protect _Unwind_FindTableEntry inside
inihbit_libc ifndefs to allow it to build with newlib or
without proper headers.
gcc/config.gcc
libgcc/config.host
libgcc/config/ia64/t-linux-libunwind
libgcc/config/ia64/unwind-ia64.c