V2 [PATCH] PKG_CHECK_MODULES: Check if $pkg_cv_[]$1[]_LIBS works

H.J. Lu hjl.tools@gmail.com
Tue Jul 28 10:45:54 GMT 2020


On Mon, Jul 27, 2020 at 12:32 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Mon, Jul 27, 2020 at 12:14 PM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > On Mon, Jul 27, 2020 at 9:11 AM Aaron Merey <amerey@redhat.com> wrote:
> > >
> > > On Mon, Jul 27, 2020 at 11:32 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > >
> > > > On Sat, Jul 25, 2020 at 9:01 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> > > > > This caused:
> > > > >
> > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=26301
> > > > >
> > > >
> > > > It is quite normal to have debuginfod headers without libdebuginfod on
> > > > multilib OSes.  Restore AC_CHECK_LIB to check if libdebuginfod exists.
> > > > And always define HAVE_LIBDEBUGINFOD to 0 or 1 for
> > > >
> > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD
> > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD
> > > > binutils/dwarf.c:#if HAVE_LIBDEBUGINFOD
> > > > binutils/dwarf.h:#if HAVE_LIBDEBUGINFOD
> > > > binutils/objdump.c:#if HAVE_LIBDEBUGINFOD
> > > > binutils/objdump.c:#endif /* HAVE_LIBDEBUGINFOD */
> > > > binutils/readelf.c:#if HAVE_LIBDEBUGINFOD
> > > > binutils/readelf.c:#endif /* HAVE_LIBDEBUGINFOD */
> > > > gdb/top.c:#if HAVE_LIBDEBUGINFOD
> > > >
> > > > OK for master?
> > >
> > > Thanks for spotting this. Normally PKG_CHECH_MODULES would correctly
> > > detect whether the .so and header are installed and build accordingly,
> > > but when cross compiling the AC_CHECK_LIB may be needed.
> >
> > I am not cross compiling.  I am simply using "gcc -m32".   The problem
> > is PKG_CHECK_MODULES which doesn't check if $pkg_cv_[]$1[]_LIBS
> > actually works.   Here is the updated patch to fix PKG_CHECK_MODULES.
> > Any comments or objections?
> >
> >
>
> HAVE_LIBDEBUGINFOD is a separate issue.  Here is the updated patch
> which only adds AC_TRY_LINK to PKG_CHECK_MODULES to check if
> $pkg_cv_[]$1[]_LIBS works.
>

I am checking it in.

-- 
H.J.


More information about the Gdb-patches mailing list