Joseph S. Myers wrote:
On Thu, 13 Mar 2008, Joel Sherrill wrote:
Also, if you use a multilib option in testing, that option goes on the
command line *after* the options specified in dg-options. The tests may
need to use dg-skip-if to skip them if any CPU option other than the one
in the test is explicitly specified (so it would be tested if no explicit
-mcpu option is used, or if -mcpu=405 is the multilib option being
tested).
Are you thinking of something roughly like this?
/* { dg-skip-if "" { { !-mcpu=405 } } { "*" } { "" } } */
I'm thinking of
/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "-mcpu=405" } } */
Thanks. Wow without an example, I don't think I ever would have
gotten it. That is cryptic.
The above is close but didn't work. It looks like the arguments
are "line target include exclude" so I swapped the last two
arguments to get this which I added after the dg-options
which adds -mcpu=405
/* { dg-skip-if "" { *-*-* } { "-mcpu=405" } { "-mcpu=" } } */
I think this is doing what we want it to. It looks like it results
the tests getting run when -mcpu=405 and excluded when
-mcpu=603e is set on the board cflags.
I did a grep and there are 155 CPU specific test cases that appear
to need to be reviewed for this.
$ grep -r dg-options * | grep mcpu | grep -v .svn | cut -d'/' -f1 | uniq -c
8 alpha
14 frv
3 m68k
76 powerpc
54 sparc
If you all think this is the right approach, ack me and I will
get the powerpc cases done first and submit a patch for review.
--joel
but I don't guarantee that will work as expected. (There are some tests
in gcc.target/cris skipping on "-march*", which seems similar.)
--
Joseph S. Myers
[EMAIL PROTECTED]
--
Joel Sherrill, Ph.D. Director of Research & Development
[EMAIL PROTECTED] On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985