GCC: disable dl_iterate_phdr in libbacktrace

On Haiku, this is now available as part of libbsd. The build
system for libbacktrace does not know about this library. In a regular
build this does not matter, as the test in the configure script will
fail to compile. However, when libbacktrace is built as a target
library, only the existence of the method in link.h is tested, which
will succeed.

This lead to libgfortan.so having undefined references.
See: https://github.com/haikuports/haikuports/issues/9241
Change-Id: I576d7802d43e11787b3bc1d09c89a42bf982dc3b
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/6950
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Niels Sascha Reedijk
2023-09-24 14:14:17 +01:00
committed by waddlesplash
parent f7a513f636
commit 752d29d624
2 changed files with 10 additions and 0 deletions

View File

@@ -13331,6 +13331,11 @@ else
have_dl_iterate_phdr=no
fi
rm -f conftest*
# On Haiku, this function only exists when linking against libbsd. This
# may be enabled in the future, but for now, disable support.
case "${host}" in
*-*-haiku*) have_dl_iterate_phdr=no ;;
esac
else
ac_fn_c_check_func "$LINENO" "dl_iterate_phdr" "ac_cv_func_dl_iterate_phdr"

View File

@@ -347,6 +347,11 @@ else
# When built as a GCC target library, we can't do a link test.
AC_EGREP_HEADER([dl_iterate_phdr], [$link_h], [have_dl_iterate_phdr=yes],
[have_dl_iterate_phdr=no])
# On Haiku, this function only exists when linking against libbsd. This
# may be enabled in the future, but for now, disable support.
case "${host}" in
*-*-haiku*) have_dl_iterate_phdr=no ;;
esac
else
AC_CHECK_FUNC([dl_iterate_phdr], [have_dl_iterate_phdr=yes],
[have_dl_iterate_phdr=no])