Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Fix configure test for ELF in BFD for static libraries
Date: Fri, 18 Jul 2008 12:09:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0807181205430.12743@digraph.polyomino.org.uk> (raw)

GDB has a configure test for ELF support in BFD.  This is a link test, 
linking with $LIBS -lbfd -liberty $intl.  If using zlib, this means -lz 
comes before -lbfd, and with static libraries that means -lz will not be 
used to resolve symbols needed by -lbfd - so the configure test fails when 
BFD requires zlib and a static zlib is being used.

This patch puts the previous $LIBS setting after the extra libraries being 
tested rather than before, so that -lz can be used to resolve symbols 
needed by -lbfd.  OK to commit?

2008-07-18  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Put old value of $LIBS after -lbfd -liberty $intl
	in BFD ELF check.
	* configure: Regenerate.

Index: configure.ac
===================================================================
RCS file: /cvs/src/src/gdb/configure.ac,v
retrieving revision 1.73
diff -u -r1.73 configure.ac
--- configure.ac	10 Jul 2008 09:30:59 -0000	1.73
+++ configure.ac	18 Jul 2008 12:03:01 -0000
@@ -1458,7 +1458,7 @@
 CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd"
 LDFLAGS="$LDFLAGS -L../bfd -L../libiberty"
 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
-LIBS="$LIBS -lbfd -liberty $intl"
+LIBS="-lbfd -liberty $intl $LIBS"
 AC_CACHE_CHECK([for ELF support in BFD], gdb_cv_var_elf,
 [AC_TRY_LINK(
 [#include <stdlib.h>

-- 
Joseph S. Myers
joseph@codesourcery.com


             reply	other threads:[~2008-07-18 12:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-18 12:09 Joseph S. Myers [this message]
2008-07-18 13:04 ` Daniel Jacobowitz

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=Pine.LNX.4.64.0807181205430.12743@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.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