From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20508 invoked by alias); 15 Nov 2012 14:36:57 -0000 Received: (qmail 20437 invoked by uid 22791); 15 Nov 2012 14:36:56 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f41.google.com (HELO mail-pb0-f41.google.com) (209.85.160.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Nov 2012 14:36:50 +0000 Received: by mail-pb0-f41.google.com with SMTP id xa7so1267992pbc.0 for ; Thu, 15 Nov 2012 06:36:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.239.232 with SMTP id vv8mr5437590pbc.53.1352990210173; Thu, 15 Nov 2012 06:36:50 -0800 (PST) Received: by 10.68.19.138 with HTTP; Thu, 15 Nov 2012 06:36:50 -0800 (PST) In-Reply-To: References: Date: Thu, 15 Nov 2012 14:36:00 -0000 Message-ID: Subject: Re: [PATCH] fix sim build when configured with --enable-plugins From: "H.J. Lu" To: Pavel Chupin Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-11/txt/msg00401.txt.bz2 On Thu, Nov 15, 2012 at 6:31 AM, Pavel Chupin 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.