This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Changing the C/C++ compiler for gdb testsuite runs
On Thu, Jan 10, 2002 at 02:30:40PM -0500, Daniel Jacobowitz wrote:
> 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!
As a followup, note that you can _NOT_ test multiple debug formats the
way that GCC tests multilibs.
You need to run with unix/gdb:debug_flags=-gdwarf-2, not just
unix/-gdwarf-2. If you do the latter, most tests will be compiled with
-g -gdwarf-2 (harmless), but nodebug.exp will be build with -gdwarf-2.
Oops.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer