This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using a compiler for testsuite that's not GCC?


Hi Andrew,

I'm talking to a gdbserver which controls my target board.

I'm not yet attuned to the role of each of these configs (could sure use a README in these dirs...), but so far I have the following:

dejagnu/config/tic54x.exp - simply loads gdbserver config
dejagnu/baseboards/tic54x.exp - most config stuff is here, including cflags/ldflags
gdb/testsuite/config/tic54x.exp - loads gdbserver config

Even though I've set cflags, some tests throw in additional options:

Running ../../../gdb/gdb/testsuite/gdb.base/all-bin.exp ...
gdb compile failed, >> WARNING: invalid option -w (ignored)
>> WARNING: invalid option -l (ignored)
>> WARNING: invalid option -m (ignored)
[all-types.c]
[all-types]
Fatal error: could not open source file "/nfs/dev-users/twall/build-gdb/gdb/test
suite/gdb.base/all-types"
1 fatal error detected in the compilation of "/nfs/dev-users/twall/build-gdb/gdb
/testsuite/gdb.base/all-types".
Compilation terminated.
WARNING: Testcase compile failed, so all tests in this file will automatically f
ail.

This looks like "-lm" is tacked on, as well as "-w".  The "-w" in the test is explicit.  I
should be able to override "-lm" if it's in a variable somewhere.




Andrew Cagney wrote:

> > What's the best way to go about this?  It seems a lot of the tests assume gcc and so throw gcc-specific options at the compiler.  It seems the approach with least effort would be to point dejagnu at a wrapper which translates gcc options into ones the other compiler understands...
>
> Can you expand a little.  The testsuite should work with any C compiler.
>
> Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]