From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22706 invoked by alias); 17 Oct 2010 10:41:12 -0000 Received: (qmail 22696 invoked by uid 22791); 17 Oct 2010 10:41:11 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_LN,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; Sun, 17 Oct 2010 10:41:06 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9HAf50B018559 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 17 Oct 2010 06:41:05 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9HAf4UU022910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 17 Oct 2010 06:41:06 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o9HAf23I009493 for ; Sun, 17 Oct 2010 12:41:02 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o9HAf1v2009484 for gdb-patches@sourceware.org; Sun, 17 Oct 2010 12:41:01 +0200 Date: Sun, 17 Oct 2010 10:41:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix --enable-plugins --without-python Message-ID: <20101017104101.GA9276@host1.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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-10/txt/msg00272.txt.bz2 Hi, currently --enable-plugins --without-python will: Reading symbols from .../gdb...I'm sorry, Dave, I can't do that. Symbol format `elf64-x86-64' unknown. due to missing elfread.c due to: configure:14941: checking for ELF support in BFD configure:14960: gcc -o conftest -g -I./../include -I../bfd -I./../bfd -L../bfd -L../libiberty conftest.c -lbfd -liberty -lncurses -lz -lm >&5 -configure:14960: $? = 0 -configure:14968: result: yes +/usr/bin/ld: ../bfd/libbfd.a(plugin.o): undefined reference to symbol 'dlsym@@GLIBC_2.2.5' +/usr/bin/ld: note: 'dlsym@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line +[...] +configure:14968: result: no Tested on x86_64-fedora13-linux-gnu. As bfd/ uses just: bfd/configure.in # AC_PLUGINS setting $plugins is called by ACX_LARGEFILE. ACX_LARGEFILE AM_CONDITIONAL(PLUGINS, test "$plugins" = "yes") bfd/Makefile.am if PLUGINS LIBDL = -ldl endif and I believe bfd/ is assumed to have the same configure options as gdb/ (is it?) proposing this patch. Thanks, Jan gdb/ 2010-10-17 Jan Kratochvil Fix configure --enable-plugins --without-python. * configure.ac (for ELF support in BFD) <"$plugins" = "yes">: New. * configure: Regenerate. --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1838,6 +1838,9 @@ OLD_LIBS=$LIBS CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` +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 +1854,9 @@ if test $gdb_cv_var_elf = yes; then CONFIG_OBS="$CONFIG_OBS elfread.o" AC_DEFINE(HAVE_ELF, 1, [Define if ELF support should be included.]) + if test "$plugins" = "yes"; then + OLD_LIBS="-ldl $OLD_LIBS" + fi fi CFLAGS=$OLD_CFLAGS LDFLAGS=$OLD_LDFLAGS