This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Fix --enable-plugins --without-python
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 17 Oct 2010 12:41:01 +0200
- Subject: [patch] Fix --enable-plugins --without-python
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 <jan.kratochvil@redhat.com>
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