summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-01-04 15:57:46 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-17 05:50:31 -0500
commit3d3fd7d89dd6c28d4aedf76fdcdbd514414f4fe1 (patch)
treefd16e0eefc565337d7619ad3791977ee64469fe4 /configure.ac
parentd56fdad76c5fe025ad628aad727c8a1c7e745513 (diff)
downloadhaskell-3d3fd7d89dd6c28d4aedf76fdcdbd514414f4fe1.tar.gz
rts/linker: Don't assume existence of dlinfo
The native-code codepath uses dlinfo to identify memory regions owned by a loaded dynamic object, facilitating safe unload. Unfortunately, this interface is not always available. Add an autoconf check for it and introduce a safe fallback behavior. Fixes #19159.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c9cf01e713..d3fbb48b86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1126,6 +1126,8 @@ AS_IF([test "$UseSystemLibFFI" = "YES"], [
dnl ** check whether we need -ldl to get dlopen()
AC_CHECK_LIB([dl], [dlopen])
AC_CHECK_LIB([dl], [dlopen], [AC_SUBST([CabalHaveLibdl], [True])], [AC_SUBST([CabalHaveLibdl], [False])])
+dnl ** check whether we have dlinfo
+AC_CHECK_FUNCS([dlinfo])
dnl --------------------------------------------------
dnl * Miscellaneous feature tests