This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] fix sim build when configured with --enable-plugins
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Pavel Chupin <pavel dot v dot chupin at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 15 Nov 2012 06:36:50 -0800
- Subject: Re: [PATCH] fix sim build when configured with --enable-plugins
- References: <CANwJu1_gKMxvsQtdPDKLQBUfY-UT6t=YcgkUDyUOjumkifvPtg@mail.gmail.com>
On Thu, Nov 15, 2012 at 6:31 AM, Pavel Chupin <pavel.v.chupin@gmail.com> wrote:
> Hi,
> Patch below fix sim builds for some targets when bfd build is
> configured with --enable-plugins. In this case libbfd.a (plugin.o) has
> dependencies on libdl so it should be included into link commands,
> similar as zlib.
> Is it OK for trunk?
>
> Patch:
>
> diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
> index fe0a5b7..1d2fd1c 100644
> --- a/sim/common/acinclude.m4
> +++ b/sim/common/acinclude.m4
> @@ -21,6 +21,7 @@
> # Include global overrides and fixes for Autoconf.
> m4_include(../../config/override.m4)
> sinclude([../../config/zlib.m4])
> +sinclude([../../config/plugins.m4])
> sinclude([../../config/depstand.m4])
>
> AC_DEFUN([SIM_AC_COMMON],
> @@ -90,6 +91,12 @@ AC_CHECK_LIB(nsl, gethostbyname)
> # using the same condition.
> AM_ZLIB
>
> +# BFD uses libdl when when plugins enabled.
> +AC_PLUGINS
> +if test "x$plugins" = "xyes"; then
> + LIBS+=" -ldl"
> +fi
> +
This is wrong. Please do it like:
http://sourceware.org/git/?p=binutils.git;a=patch;h=f780e457f046c09d336e4dab0ffbcfbec70bfbee
--
H.J.