]> git.ipfire.org Git - thirdparty/bind9.git/commit
Check for _Unwind_Backtrace() support
authorMichał Kępień <michal@isc.org>
Fri, 30 Oct 2020 08:12:50 +0000 (09:12 +0100)
committerMichał Kępień <michal@isc.org>
Fri, 30 Oct 2020 08:42:24 +0000 (09:42 +0100)
commita51cde6ceb49af07cb7aee1c2b9cd1126e3d61d3
treed0221ee2cd84c100d5c115ac7092482a4ccd15f2
parentc5d38c7a838987d1ad41768df43b96905a1c46be
Check for _Unwind_Backtrace() support

Some operating systems (e.g. Linux, FreeBSD) provide the
_Unwind_Backtrace() function in libgcc_s.so, which is automatically
linked into any binary using the functions provided by that library.  On
OpenBSD, though, _Unwind_Backtrace() is provided by libc++abi.so, which
is not automatically linked into binaries produced by the stock system C
compiler.

Meanwhile, lib/isc/backtrace.c assumes that any GNU-compatible toolchain
allows _Unwind_Backtrace() to be used without any extra provisions in
the build system.  This causes build failures on OpenBSD (and possibly
other systems).

Instead of making assumptions, actually check for _Unwind_Backtrace()
support in the toolchain if the backtrace() function is unavailable.

(cherry picked from commit 10d705579189c6f4363bc2a85a0b559a6fbcb264)
config.h.in
configure
configure.ac
lib/isc/backtrace.c