This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix configure test for ELF in BFD for static libraries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]