Re: Changing the C/C++ compiler for gdb testsuite runs

Kevin Buettner
2002-01-10T19:10:04Z

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...

Kevin