From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5721 invoked by alias); 9 Mar 2004 20:09:30 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 5708 invoked from network); 9 Mar 2004 20:09:30 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 9 Mar 2004 20:09:30 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 930952B92; Tue, 9 Mar 2004 15:09:29 -0500 (EST) Message-ID: <404E2479.6050609@gnu.org> Date: Tue, 09 Mar 2004 20:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Michael Elizabeth Chastain Cc: gdb@sources.redhat.com, manjo@austin.ibm.com Subject: Re: gdb build using different compiler References: <20040309185341.8027B4B104@berman.michael-chastain.com> In-Reply-To: <20040309185341.8027B4B104@berman.michael-chastain.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00075.txt.bz2 > Hi Manoj, > > >>> How do I build gdb 6.1 using a compiler in /opt/tools/gcc instead of >>> /usr/bin/gcc? > > > Put /opt/tools/gcc/bin in your $PATH variable in front of /usr/bin. > > PATH=/opt/tools/gcc/bin:$PATH > export PATH FYI, a possibly better way is: ( CC=/opt/tools/gcc/bin/gcc ; export CC ; CXX=/opt/tools/gcc/bin/c++ ; export CXX ; ..../configure ) This has the benefit(?) of hard-wiring CC and CXX into the Makefile and hence making the build immune to changes in your path. BTW, for testing the magic is more weird: make check RUNTESTFLAGS='CC_FOR_TARGET=/../cc CXX_FOR_TARGET=/../c++' I think they should default to CC/CXX, but I've no idea where/why that isn't happening :-/ Andrew > Then do this to make sure you're getting the gcc you want: > > gcc --version > > You might have to tweak "/opt/tools/gcc/bin" to get the result you want. > > That's all there is to it! >