This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/configure: Replace hardcoded -ldl with check based on dlfcn.h availability
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: pavel dot v dot chupin at gmail dot com
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 6 May 2013 14:30:00 +0200 (CEST)
- Subject: Re: [PATCH] gdb/configure: Replace hardcoded -ldl with check based on dlfcn.h availability
- References: <CANwJu1-LGhEaeA3Mmi37UkLZOAqEFpzFpKaKzL3MVA2WORdR7Q at mail dot gmail dot com> <CANwJu18MP86hi3etqskPSR3Pt6tPEZCSndzW2No_9ZHEig0AHQ at mail dot gmail dot com>
> Date: Mon, 6 May 2013 15:28:14 +0400
> From: Pavel Chupin <pavel.v.chupin@gmail.com>
>
> On Wed, Apr 17, 2013 at 3:21 PM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
> > Hi,
> > Attached patch adds check for dlfcn.h header availability before
> > adding -ldl to some configure commands. Otherwise on some
> > configuration -ldl is added unconditionally even though it's not
> > required and gdb is configured without ELF support due to failed link.
> >
> > Issue is found on mingw gdb build for Android.
> >
> > gdb/ChangeLog entry:
> > 2013-04-16 Pavel Chupin <pavel.v.chupin@intel.com>
> >
> > Replace hardcoded -ldl with check based on dlfcn.h availability
> > * configure.ac: Add dlfcn.h check and DLOPEN_LIBS def.
> > * acinclude.m4: Use DLOPEN_LIBS instead of hardcode.
> > * configure: Regenerate.
> >
>
> Ping
The fix isn't quite right. OpenBSD for example has <dlfcn.h> but no
libdl; dlopen(3) and friends live in libc.