[PATCH mingw/gold] Fix mingw gold build with plugins enabled for non-dlfcn case

Pavel Chupin pavel.v.chupin@gmail.com
Fri Jan 11 12:31:00 GMT 2013


On Thu, Jan 10, 2013 at 10:04 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Thu, Jan 10, 2013 at 12:24 AM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
>> On Wed, Jan 9, 2013 at 7:50 PM, Ian Lance Taylor <iant@google.com> wrote:
>>>
>>> Hmmmm, there is a problem here.  You have introduced the use of
>>> libtool into configure.ac when it was not there before.  When I run
>>> autoreconf, this causes automake to rebuild the linker Makefile to use
>>> libtool rather than the simple commands that it used before.  I'm not
>>> at all sure that that is a good idea.
>>>
>>> Can we get this information without using libtool?
>>>
>>> Ian
>>
>> Well, we need to find the library which provides dlopen somehow.
>> libtool is doing that the long and correct way, it checks the
>> architecture, and tries different options to determine available
>> library. libtool is shared between several projects so if any fix is
>> made it will be propagated. IMHO it is the best long term fix. I don't
>> know if it's possible to reuse only LT_INIT(dlopen) part of libtool,
>> my attempts failed.
>>
>> My goal is to fix mingw build when there is no libdl. If we don't
>> really care about other libraries which may provide dlopen I can try
>> to implement the following:
>>
>> 1) Check for dlfcn.h header
>> 2) If found just add hardcoded -ldl. If not found add nothing.
>>
>> What do you think?
>
> I'm fine with that since it is no worse than what we have today.
>
> Ian

Ok. Please see patch attached.

ChangeLog:

2013-01-11  Pavel Chupin  <pavel.v.chupin@intel.com>

        Fix mingw gold build with plugins enabled
        * Makefile.am: Replace -ldl with @lt_cv_dlopen_libs@.
        * configure.ac: Export lt_cv_dlopen_libs and add headers check.
        * plugin.cc: Handle non-dlfcn case.
        * Makefile.in: Regenerate.
        * config.in: Regenerate.
        * configure: Regenerate.
        * testsuite/Makefile.in: Regenerate.

--
Pavel Chupin
Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold-plugins-3.patch
Type: application/octet-stream
Size: 2242 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20130111/87553f98/attachment.obj>


More information about the Binutils mailing list