From patchwork Tue Aug 19 12:28:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 2432 Received: (qmail 29384 invoked by alias); 19 Aug 2014 12:29:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 29366 invoked by uid 89); 19 Aug 2014 12:29:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-pa0-f41.google.com Received: from mail-pa0-f41.google.com (HELO mail-pa0-f41.google.com) (209.85.220.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 19 Aug 2014 12:29:09 +0000 Received: by mail-pa0-f41.google.com with SMTP id rd3so9964703pab.14 for ; Tue, 19 Aug 2014 05:29:06 -0700 (PDT) X-Received: by 10.68.243.70 with SMTP id ww6mr43506093pbc.3.1408451344765; Tue, 19 Aug 2014 05:29:04 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-155-134.oycza5.sa.bigpond.net.au. [58.160.155.134]) by mx.google.com with ESMTPSA id zq5sm19128277pbb.37.2014.08.19.05.29.01 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 05:29:03 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 6C86EEA3743; Tue, 19 Aug 2014 21:58:57 +0930 (CST) Date: Tue, 19 Aug 2014 21:58:57 +0930 From: Alan Modra To: Hans-Peter Nilsson Cc: amker.cheng@gmail.com, binutils@sourceware.org, gdb-patches@sourceware.org Subject: Re: Skip ld/lto tests if plugins is disabled for binutils? Message-ID: <20140819122857.GG7047@bubble.grove.modra.org> Mail-Followup-To: Hans-Peter Nilsson , amker.cheng@gmail.com, binutils@sourceware.org, gdb-patches@sourceware.org References: <201408190343.s7J3hQqW030737@ignucius.se.axis.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <201408190343.s7J3hQqW030737@ignucius.se.axis.com> User-Agent: Mutt/1.5.21 (2010-09-15) On Tue, Aug 19, 2014 at 05:43:26AM +0200, Hans-Peter Nilsson wrote: > > From: Bin.Cheng > > Date: Tue, 19 Aug 2014 04:28:32 +0200 > > > On Fri, Aug 15, 2014 at 11:41 PM, Hans-Peter Nilsson > > wrote: > > >> From: Hans-Peter Nilsson > > >> Date: Fri, 15 Aug 2014 17:17:13 +0200 > > > > > >> I'd rather fix up the broken pieces of "plugin support" > > >> (just there to pacify bfd's need) that actually *are* in sim > > >> already and look like they *should* pull in -ldl. See > > >> sim/common/{configure.ac,Make-common.in}; I'm looking into it. > > > > > > Looks like all that's actually needed is to regenerate > > > sim/*/configure, for example by means of "make autoconf-common" > > > in sim. Will do later; no keys here. > > > > Hi Hans-Peter, > > Any updates about this? In the meantime, what else can I do except > > disable plugins/lto through out all toolchain components? Since we > > use combined source tree and can't configure binutils and gdb > > differently. Thanks very much. > > Roland McGrath committed a re-build of sim/*/config{.in,ure} > later that day. I'm guessing you haven't tried since then? > arm-eabi is fine in my autotester builds (using only --target > and --prefix options). > > There are a couple of simulators suffering from fallout from the > regenerated config.in due to older configury bugs > (e.g. iq2000-elf, frv-elf, m32r-elf and powerpc-eabisim needs > special treatment), but you didn't mention any others. I'm about to commit the following to clean up my mess. Adding -ldl in AC_PLUGINS fixes the current --disable-shared breakage. It's not strictly necessary to add -ldl in directories that use libtool to link libbfd, eg. binutils, since libtool magically picks up libbfd dependencies (libbfd.la dependency_libs shell variable). However, invoking AC_SEARCH_LIBS in AC_PLUGINS has the benefit that it only needs doing in one place. bfd/ * configure: Regenerate. binutils/ * configure: Regenerate. config/ * plugins.m4 (AC_PLUGINS): If plugins are enabled, add -ldl to LIBS via AC_SEARCH_LIBS. gas/ * configure: Regenerate. gdb/ * acinclude.m4 (GDB_AC_CHECK_BFD): Don't add -ldl. * config.in: Regenerate. * configure: Regenerate. gprof/ * configure: Regenerate. ld/ * configure: Regenerate. sim/arm/ * configure: Regenerate. sim/avr/ * configure: Regenerate. sim/bfin/ * configure: Regenerate. sim/common/ * configure: Regenerate. sim/cr16/ * configure: Regenerate. sim/cris/ * configure: Regenerate. sim/d10v/ * configure: Regenerate. sim/erc32/ * configure: Regenerate. sim/frv/ * configure: Regenerate. sim/h8300/ * configure: Regenerate. sim/iq2000/ * configure: Regenerate. sim/lm32/ * configure: Regenerate. sim/m32c/ * configure: Regenerate. sim/m32r/ * configure: Regenerate. sim/m68hc11/ * configure: Regenerate. sim/mcore/ * configure: Regenerate. sim/microblaze/ * configure: Regenerate. sim/mips/ * configure: Regenerate. sim/mn10300/ * configure: Regenerate. sim/moxie/ * configure: Regenerate. sim/msp430/ * configure: Regenerate. sim/ppc/ * configure.ac: Invoke AC_PLUGINS. * configure: Regenerate. * config.in: Regenerate. sim/rl78/ * configure: Regenerate. sim/rx/ * configure: Regenerate. sim/sh/ * configure: Regenerate. sim/sh64/ * configure: Regenerate. sim/v850/ * configure: Regenerate. diff --git a/config/plugins.m4 b/config/plugins.m4 index f65fdcb..513c690 100644 --- a/config/plugins.m4 +++ b/config/plugins.m4 @@ -15,4 +15,7 @@ AC_DEFUN([AC_PLUGINS], esac], [plugins=$maybe_plugins] ) + if test "$plugins" = "yes"; then + AC_SEARCH_LIBS([dlopen], [dl]) + fi ]) diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4 index a3fb9e2..2b46f73 100644 --- a/gdb/acinclude.m4 +++ b/gdb/acinclude.m4 @@ -458,10 +458,6 @@ AC_DEFUN([GDB_AC_CHECK_BFD], [ CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` - # -ldl is provided by bfd/Makfile.am (LIBDL) . - if test "$plugins" = "yes"; then - AC_SEARCH_LIBS(dlopen, dl) - fi LIBS="-lbfd -liberty $intl $LIBS" AC_CACHE_CHECK([$1], [$2], [AC_TRY_LINK( diff --git a/gdb/config.in b/gdb/config.in diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 9c3fa54..f1a7e06 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -670,6 +670,9 @@ AC_ARG_PROGRAM # using the same condition. AM_ZLIB +# BFD uses libdl when when plugins enabled. +AC_PLUGINS + . ${srcdir}/../../bfd/configure.host case ${host} in