From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23851 invoked by alias); 10 Jan 2002 19:30:19 -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 23802 invoked from network); 10 Jan 2002 19:30:16 -0000 Received: from unknown (HELO nevyn.them.org) (128.2.145.6) by sources.redhat.com with SMTP; 10 Jan 2002 19:30:16 -0000 Received: from drow by nevyn.them.org with local (Exim 3.33 #1 (Debian)) id 16OkuO-0002VH-00; Thu, 10 Jan 2002 14:30:40 -0500 Date: Thu, 10 Jan 2002 11:30:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: Michael Elizabeth Chastain , Richard.Earnshaw@arm.com, gdb@sources.redhat.com Subject: Re: Changing the C/C++ compiler for gdb testsuite runs Message-ID: <20020110143040.A9479@nevyn.them.org> Mail-Followup-To: Kevin Buettner , Michael Elizabeth Chastain , Richard.Earnshaw@arm.com, gdb@sources.redhat.com References: <200201101658.KAA16306@duracef.shout.net> <1020110190932.ZM5067@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1020110190932.ZM5067@localhost.localdomain> User-Agent: Mutt/1.3.23i X-SW-Source: 2002-01/txt/msg00103.txt.bz2 On Thu, Jan 10, 2002 at 12:09:33PM -0700, Kevin Buettner wrote: > On Jan 10, 10:58am, Michael Elizabeth Chastain wrote: > > > If you build gcc and gdb in a unified build tree then dejagnu will find > > and use the uninstalled compiler in the unified build tree, even in > > preference to $PATH. That behaviour actually got in my way so I stopped > > using unified trees. > > Here's one way to use a different compiler in a unified tree... > > 1) In gdb/testsuite (in your build directory), do > > make site.exp > > 2) Add lines similar to the following to the end of > gdb/testsuite/site.exp: > > set CC_FOR_TARGET "/some/other/path/to/gcc" > set CXX_FOR_TARGET "/some/other/path/to/g++" > > If anyone knows of other (more elegant) tricks that can be used to > accomplish the same thing, I'd like to hear about them... I do this by different board files. In dejagnu/baseboards, copy unix.exp. Edit it. It should originally say: set_board_info compiler "[find_gcc]"; I have: set_board_info compiler "/opt/src/gcc/install-30/bin/gcc"; set_board_info c++compiler "/opt/src/gcc/install-30/bin/g++"; There's matching variables for all the other compiler types (Java etc). I don't yet test those. Then, to run: ../../../src/dejagnu/runtest --target_board "unix unix3" blah.exp That will run tests for both the default GCC and the custom in install-30. You can also do: --target_board "unix/gdb:debug_flags=-gdwarf-2" to test DWARF-2, or likewise for any other flag. There's a pure /dwarf2 option but don't use it; that's dwarf-1 level 2. I've been forgetting to file a DejaGNU bug report about this. The results of this thread should go in the GDB manual somewhere! -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer