From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19638 invoked by alias); 5 Nov 2010 01:52:31 -0000 Received: (qmail 19571 invoked by uid 22791); 5 Nov 2010 01:52:31 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Nov 2010 01:52:24 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA51q0ni025162 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Nov 2010 21:52:00 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id oA51ptKO003031 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 4 Nov 2010 21:51:59 -0400 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id oA51pqHl025004; Fri, 5 Nov 2010 02:51:53 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id oA51pn5q025003; Thu, 4 Nov 2010 15:51:49 -1000 Date: Fri, 05 Nov 2010 01:52:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix --enable-plugins --without-python Message-ID: <20101105015148.GA24699@host0.dyn.jankratochvil.net> References: <20101017104101.GA9276@host1.dyn.jankratochvil.net> <20101102184341.GF2492@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101102184341.GF2492@adacore.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2010-11/txt/msg00100.txt.bz2 On Tue, 02 Nov 2010 08:43:41 -1000, Joel Brobecker wrote: > Grumpf! It would be nice if BFD was telling us which libraries we need > to link against bfd, just as Gtk+, Python, etc, do. I agree we should port the sourceware tree to pkg-config. :-) > I'm a little concern that this is a bit primitive, and good enough only > on GNU/Linux or maybe Unix. Or rather, that this might break the build > on some platforms such as Windows. But that's not the case, since > the user would need to use --enable-plugins to enable plugins (it's > not automatic), so I don't see a better solution that's actually > worth the effort. bfd/Makefile.am also just adds `-ldl' (into *_LIBADD) so while I do not understand what everything is emulated on these non-UNIX platforms I guess it is either broken for --enable-plugins already even for bfd/ or it should work even in gdb/ . > A comment explaining the dependency would be nice (likewise below). Done. Checked-in. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2010-11/msg00028.html --- src/gdb/ChangeLog 2010/11/05 01:40:27 1.12297 +++ src/gdb/ChangeLog 2010/11/05 01:50:17 1.12298 @@ -1,5 +1,11 @@ 2010-11-05 Jan Kratochvil + Fix configure --enable-plugins --without-python. + * configure.ac (for ELF support in BFD) <"$plugins" = "yes">: New. + * configure: Regenerate. + +2010-11-05 Jan Kratochvil + * solib.c (solib_read_symbols): Call exception_fprintf even without FROM_TTY. Print also so->so_name. --- src/gdb/configure 2010/10/06 16:02:43 1.318 +++ src/gdb/configure 2010/11/05 01:50:17 1.319 @@ -14937,6 +14937,10 @@ CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` +# -ldl is provided by bfd/Makfile.am (LIBDL) . +if test "$plugins" = "yes"; then + LIBS="-ldl $LIBS" +fi LIBS="-lbfd -liberty $intl $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 $as_echo_n "checking for ELF support in BFD... " >&6; } @@ -14972,6 +14976,10 @@ $as_echo "#define HAVE_ELF 1" >>confdefs.h + # -ldl is provided by bfd/Makfile.am (LIBDL) . + if test "$plugins" = "yes"; then + OLD_LIBS="-ldl $OLD_LIBS" + fi fi CFLAGS=$OLD_CFLAGS LDFLAGS=$OLD_LDFLAGS --- src/gdb/configure.ac 2010/10/06 16:02:43 1.132 +++ src/gdb/configure.ac 2010/11/05 01:50:18 1.133 @@ -1838,6 +1838,10 @@ CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` +# -ldl is provided by bfd/Makfile.am (LIBDL) . +if test "$plugins" = "yes"; then + LIBS="-ldl $LIBS" +fi LIBS="-lbfd -liberty $intl $LIBS" AC_CACHE_CHECK([for ELF support in BFD], gdb_cv_var_elf, [AC_TRY_LINK( @@ -1851,6 +1855,10 @@ CONFIG_OBS="$CONFIG_OBS elfread.o" AC_DEFINE(HAVE_ELF, 1, [Define if ELF support should be included.]) + # -ldl is provided by bfd/Makfile.am (LIBDL) . + if test "$plugins" = "yes"; then + OLD_LIBS="-ldl $OLD_LIBS" + fi fi CFLAGS=$OLD_CFLAGS LDFLAGS=$OLD_LDFLAGS