Hi Waldemar,

On 05/01/16 05:00, Waldemar Brodkorb wrote:
> Greg Ungerer wrote,
>> On 31/12/15 09:55, Waldemar Brodkorb wrote:
>>> Add a check for dlopen to configure.ac
>>>
>>> Signed-off-by: Waldemar Brodkorb <w...@uclibc-ng.org>
>>> ---
>>>  configure.ac |    1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 4e7df5a..adf5883 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -192,6 +192,7 @@ dnl redirect some functions to the system symbols, but 
>>> other local symbols
>>>  dnl come from libiberty/libbfd.
>>>  dnl int getopt(int, char * const [], const char *) __asm("_" "getopt" 
>>> "$UNIX2003");
>>>  AC_CHECK_LIB(c, malloc, LIBS="-lc $LIBS")
>>> +AC_CHECK_LIB(dl, dlopen)
>>
>> Could you successfully compile with just this?
> 
> Yes. May be it depends on the autoconf/automake used?
> Or it depends on binutils version?
> I am using binutils 2.25.1. Checked with --enable-plugins on and
> off for m68k.

I am using binutils-2.25.1 also. I used my system autoconf
(which was version 2.69).


>> I have to use:
>>
>>   AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")
>>
>> to get the correct lib ordering at link time. Otherwise the
>> linking of elf2flt fails for me (testing with m68k).
> 
> Should I send an update? So it does fix a case where it fails for
> you?

Yes. I had to have the -ldl at the end of the link line
of elf2flt for it to successfully link.

If you could generate a new patch that would be good.


> I remember buildroot having problems, when LTO and so
> --enable-plugins in binutils is used, they just add -ldl:
> http://lists.busybox.net/pipermail/buildroot/2015-September/139966.html

The original check did force -ldl to be added to the libs list
at build time. But it was too early in the args list, it had
to be after the bfd libs to work for me.

Regards
Greg



_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to