Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Using a compiler for testsuite that's not GCC?
@ 2001-10-29  6:13 Timothy Wall
  2001-10-29  8:21 ` Andrew Cagney
  2001-10-29  9:44 ` Stan Shebs
  0 siblings, 2 replies; 7+ messages in thread
From: Timothy Wall @ 2001-10-29  6:13 UTC (permalink / raw)
  To: gdb

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

T.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
  2001-10-29  6:13 Using a compiler for testsuite that's not GCC? Timothy Wall
@ 2001-10-29  8:21 ` Andrew Cagney
  2001-10-29  9:05   ` Timothy Wall
  2001-10-29  9:15   ` Timothy Wall
  2001-10-29  9:44 ` Stan Shebs
  1 sibling, 2 replies; 7+ messages in thread
From: Andrew Cagney @ 2001-10-29  8:21 UTC (permalink / raw)
  To: twall; +Cc: gdb

> 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
  2001-10-29  8:21 ` Andrew Cagney
@ 2001-10-29  9:05   ` Timothy Wall
  2001-10-29  9:15   ` Timothy Wall
  1 sibling, 0 replies; 7+ messages in thread
From: Timothy Wall @ 2001-10-29  9:05 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
  2001-10-29  8:21 ` Andrew Cagney
  2001-10-29  9:05   ` Timothy Wall
@ 2001-10-29  9:15   ` Timothy Wall
  1 sibling, 0 replies; 7+ messages in thread
From: Timothy Wall @ 2001-10-29  9:15 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: gdb

Looking at gdb_preprocess and gdb_compile from gdb.exp, it would look like I would need to replace these functions with something that works with my compiler?

Pardon me if I'm being dense, but I'm trying to figure out where are the proper places for configuration mods, and I don't see anything that resembles my configuration.

T.

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
  2001-10-29  6:13 Using a compiler for testsuite that's not GCC? Timothy Wall
  2001-10-29  8:21 ` Andrew Cagney
@ 2001-10-29  9:44 ` Stan Shebs
  2001-10-29 10:04   ` Timothy Wall
  1 sibling, 1 reply; 7+ messages in thread
From: Stan Shebs @ 2001-10-29  9:44 UTC (permalink / raw)
  To: twall; +Cc: gdb

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

Testsuite should be able to work with any compiler, athough in
practice GCCisms sneak in from to time.  Note however that there
is an implicit expectation that the compiler accepts a basic list
of options common to Unix compilers, such as -g, -o, etc.  -l
would be in that category, though not necessarily the list of
libraries, and maybe -w, not sure about that.

If you wanted to generalize the testsuite though, that would be
a good thing.

Stan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
  2001-10-29  9:44 ` Stan Shebs
@ 2001-10-29 10:04   ` Timothy Wall
  0 siblings, 0 replies; 7+ messages in thread
From: Timothy Wall @ 2001-10-29 10:04 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gdb

Well, since my cross compiler uses just about none of the "standard" options, I think I'm going to have to hack away and integrate later...

T.


Stan Shebs wrote:

> Timothy Wall 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...
>
> Testsuite should be able to work with any compiler, athough in
> practice GCCisms sneak in from to time.  Note however that there
> is an implicit expectation that the compiler accepts a basic list
> of options common to Unix compilers, such as -g, -o, etc.  -l
> would be in that category, though not necessarily the list of
> libraries, and maybe -w, not sure about that.
>
> If you wanted to generalize the testsuite though, that would be
> a good thing.
>
> Stan


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Using a compiler for testsuite that's not GCC?
@ 2001-10-29 20:04 Timothy Wall
  0 siblings, 0 replies; 7+ messages in thread
From: Timothy Wall @ 2001-10-29 20:04 UTC (permalink / raw)
  To: gdb, References: <3BDD63C0.FA2CE158@oculustech.com>

I think I've found a reasonable solution.

Some things are easy enough to modify (cflags, mathlib), but I ended up having to write my own {target}_compile function which swaps out the unwanted args, replacing them if possible.  I pretty much had to do a rewrite of the default_target_compile function in dejagnu/lib/target.exp since the compiler I'm using has a really heinous command-line configuration that hearkens back to the DOS days.

T.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-10-29 20:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-29  6:13 Using a compiler for testsuite that's not GCC? Timothy Wall
2001-10-29  8:21 ` Andrew Cagney
2001-10-29  9:05   ` Timothy Wall
2001-10-29  9:15   ` Timothy Wall
2001-10-29  9:44 ` Stan Shebs
2001-10-29 10:04   ` Timothy Wall
2001-10-29 20:04 Timothy Wall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox