This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold commit] PR gold/16203: Fix build failure on Gentoo/FreeBSD

PR gold/16203 complains that gold assumes that -ldl is needed when
plugins are enabled, but dlopen is provided by default on FreeBSD.
I've committed the following patch to check what library is needed for


2013-11-22  Cary Coutant  <>

        PR gold/16203
        * Add check for which library is needed for
        * configure: Regenerate.

diff --git a/gold/ b/gold/
index 82ad11e..9bc216b 100644
--- a/gold/
+++ b/gold/
@@ -528,9 +528,14 @@ AC_CHECK_HEADERS(ext/hash_map ext/hash_set)

 dnl When plugins enabled dynamic loader interface is required. Check headers
-dnl which may provide this interface. In case of dlfcn.h add libdl to link.
+dnl which may provide this interface. Add the necessary library to link.
+AC_SEARCH_LIBS(dlopen, [dl dld])
+case "$ac_cv_search_dlopen" in
+  no*) DLOPEN_LIBS="";;
+  *)   DLOPEN_LIBS="$ac_cv_search_dlopen";;

 AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]