Bug 14430 - binutils-2.22.90 plugin code fails to build on FreeBSD due to hardcoding of -ldl
Summary: binutils-2.22.90 plugin code fails to build on FreeBSD due to hardcoding of -ldl
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.24
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-02 16:14 UTC by Richard Yao
Modified: 2013-01-27 16:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Failure log (17.48 KB, text/x-log)
2012-08-02 16:14 UTC, Richard Yao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Yao 2012-08-02 16:14:52 UTC
Created attachment 6565 [details]
Failure log

The upcoming 2.23 release fails to build on FreeBSD because it attempts to link -ldl during the build process. I believe that FreeBSD's libc includes this library's functionality.
Comment 1 Richard Yao 2012-08-02 16:23:09 UTC
This also affects binutils 2.22. A patch for this issue was sent to the binutils mailing list, but there was no response:

http://sourceware.org/ml/binutils/2012-04/msg00040.html
Comment 2 Mike Frysinger 2013-01-27 16:59:01 UTC
binutils fix:

From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 13 Oct 2012 14:17:08 +0000
Subject: [PATCH] Replace -ldl with @lt_cv_dlopen_libs@

    * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
    * configure.in (lt_cv_dlopen_libs): AC_SUBST.
    * Makefile.in: Regenerated.
    * configure: Likewise.

gold fix:

From: Ian Lance Taylor <ian@airs.com>
Date: Fri, 11 Jan 2013 14:36:36 +0000
Subject: [PATCH]    Fix mingw gold build with plugins enabled   *
 Makefile.am: Replace -ldl with @DLOPEN_LIBS@.  * configure.ac: Export
 DLOPEN_LIBS and add headers check.     * plugin.cc: Handle non-dlfcn case. 
 * Makefile.in: Regenerate.     * config.in: Regenerate.    * configure:
 Regenerate.    * testsuite/Makefile.in: Regenerate.