Skip to content

Commit 297f242

Browse files
committed
Optimize -ldl usage on platforms that use dlopen for libFFI.
1 parent e577439 commit 297f242

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

configure

+11-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+5-1
Original file line numberDiff line numberDiff line change
@@ -4045,7 +4045,11 @@ AS_VAR_IF([have_libffi], [yes], [
40454045
AC_SUBST([MODULE__CTYPES_MALLOC_CLOSURE])
40464046
40474047
dnl HAVE_LIBDL: for dlopen, see gh-76828
4048-
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])])
4048+
AS_VAR_IF([ac_cv_lib_dl_dlopen], [yes], [
4049+
AS_VAR_IF([ac_cv_require_ldl], [yes], [], [
4050+
AS_VAR_APPEND([LIBFFI_LIBS], [" -ldl"])
4051+
])
4052+
])
40494053
40504054
WITH_SAVE_ENV([
40514055
CFLAGS="$CFLAGS $LIBFFI_CFLAGS"

0 commit comments

Comments
 (0)