From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2517 invoked by alias); 7 Feb 2012 20:15:32 -0000 Received: (qmail 2476 invoked by uid 22791); 7 Feb 2012 20:15:28 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Feb 2012 20:15:07 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q17KF5if005618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 7 Feb 2012 15:15:05 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q17KF4FJ029674; Tue, 7 Feb 2012 15:15:04 -0500 Message-ID: <4F318648.8@redhat.com> Date: Tue, 07 Feb 2012 20:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0 MIME-Version: 1.0 To: Luca Pizzamiglio CC: gdb-patches@sourceware.org Subject: Re: wrong bfd recognized References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-02/txt/msg00086.txt.bz2 On 12/13/2011 03:13 PM, Luca Pizzamiglio wrote: > +++ gdb/configure.ac 2011-12-13 15:34:08.559285673 +0100 > @@ -1854,7 +1854,7 @@ > OLD_LDFLAGS=$LDFLAGS > OLD_LIBS=$LIBS > CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" > -LDFLAGS="$LDFLAGS -L../bfd -L../libiberty" > +LDFLAGS="-L../bfd -L../libiberty $LDFLAGS" If you set LDFLAGS to -L/foo/lib , you presumably also set CFLAGS to -I/foo/include . In that case, after the patch, if there's a libbfd in /foo/, you'll run the test with gdb's bfd, but compile it against e.g., the bfd.h from /foo/include. You may not see this happen with /usr/local/include because gcc usually ignores -I/usr/local/include as being a duplicate of a system header path. IOW, it'd make sense to also do: - CFLAGS="$CFLAGS -I${srcdir}/../include -I../bfd -I${srcdir}/../bfd" + CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" -- Pedro Alves