From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Fix --enable-plugins --without-python
Date: Fri, 05 Nov 2010 01:52:00 -0000 [thread overview]
Message-ID: <20101105015148.GA24699@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <20101102184341.GF2492@adacore.com>
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 <jan.kratochvil@redhat.com>
+ Fix configure --enable-plugins --without-python.
+ * configure.ac (for ELF support in BFD) <"$plugins" = "yes">: New.
+ * configure: Regenerate.
+
+2010-11-05 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* 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) <PLUGINS>.
+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) <PLUGINS>.
+ 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) <PLUGINS>.
+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) <PLUGINS>.
+ if test "$plugins" = "yes"; then
+ OLD_LIBS="-ldl $OLD_LIBS"
+ fi
fi
CFLAGS=$OLD_CFLAGS
LDFLAGS=$OLD_LDFLAGS
next prev parent reply other threads:[~2010-11-05 1:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-17 10:41 Jan Kratochvil
2010-11-02 18:43 ` Joel Brobecker
2010-11-05 1:52 ` Jan Kratochvil [this message]
2010-11-05 9:08 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101105015148.GA24699@host0.dyn.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox