Skip to content

Commit 64d81b4

Browse files
committed
ensure -ldl is passed to the linker when dladdr1 is found
1 parent cc05e4b commit 64d81b4

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

configure

Lines changed: 13 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,8 +2986,12 @@ AC_HEADER_DIRENT
29862986
AC_HEADER_MAJOR
29872987

29882988
# for faulthandler
2989-
AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h],
2990-
[AC_CHECK_FUNCS(backtrace backtrace_symbols dladdr1)])
2989+
AC_CHECK_HEADERS([execinfo.h link.h dlfcn.h], [
2990+
AC_CHECK_FUNCS([backtrace backtrace_symbols dladdr1], [
2991+
# dladdr1 requires -ldl
2992+
AS_VAR_APPEND([LDFLAGS], [" -ldl"])
2993+
])
2994+
])
29912995

29922996
# bluetooth/bluetooth.h has been known to not compile with -std=c99.
29932997
# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294

0 commit comments

Comments
 (0)