This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix sim build when configured with --enable-plugins


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]