From 0d5a8de4e3cb4ed231bfdcce8ea5693f6652cc5f Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 17 Mar 2017 11:21:13 +0300 Subject: [PATCH] Fix GC shared library tests failure (musl) Detect dl_iterate_phdr() presence by configure. * configure.ac (dl_iterate_phdr): Add AC_CHECK_FUNCS for. * configure.ac [ac_cv_func_dl_iterate_phdr] (HAVE_DL_ITERATE_PHDR): AC_DEFINE it. --- configure.ac | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index fa745b5..2cd79dc 100644 --- a/configure.ac +++ b/configure.ac @@ -470,6 +470,13 @@ if test "$ac_cv_func_getcontext" = "no"; then AC_DEFINE([NO_GETCONTEXT], [1], [Missing getcontext()]) fi +# Check whether dl_iterate_phdr exists (as a strong symbol). +AC_CHECK_FUNCS([dl_iterate_phdr]) +if test "$ac_cv_func_dl_iterate_phdr" = "yes"; then + AC_DEFINE([HAVE_DL_ITERATE_PHDR], [1], + [Define if 'dl_iterate_phdr' function is available.]) +fi + case "$host" in # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 # and unnecessary everywhere. -- 2.7.4