From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14408 invoked by alias); 18 Jul 2008 12:09:49 -0000 Received: (qmail 14397 invoked by uid 22791); 18 Jul 2008 12:09:48 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 18 Jul 2008 12:09:23 +0000 Received: (qmail 29769 invoked from network); 18 Jul 2008 12:09:21 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 18 Jul 2008 12:09:21 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.68) (envelope-from ) id 1KJom0-00056s-Jh for gdb-patches@sourceware.org; Fri, 18 Jul 2008 12:09:20 +0000 Date: Fri, 18 Jul 2008 12:09:00 -0000 From: "Joseph S. Myers" To: gdb-patches@sourceware.org Subject: Fix configure test for ELF in BFD for static libraries Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2008-07/txt/msg00361.txt.bz2 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 * 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 -- Joseph S. Myers joseph@codesourcery.com