This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Excluding dejagnu testcases for subtargets


On Fri, Aug 10, 2012 at 09:54:17AM -0700, Janis Johnson wrote:
> On 08/09/2012 10:52 PM, Senthil Kumar Selvaraj wrote:
> > Hi,
> > 
> >  What is the recommended way to skip specific (non target specific) testcases for a  subtargets?
> > 
> >  There are a bunch of tests in the gcc testsuite that are too big (in
> >  terms of code size or memory) for a subtarget of the avr target. The
> >  subtarget is specified in the dejagnu board configuration file
> >  (set_board_info cflags "-mmcu <subtarget name>").
> > 
> >  Using dg-skip-if with "-mmcu <subtarget name>" for the include part did
> >  not work. Looking at the source (target-supports-dg.exp) showed that it 
> >  doesn't consider board_info cflags. Only board_info multilib_flags, 
> >  flags specified in dg-options, $TOOL_OPTIONS and $TEST_ALWAYS_FLAGS 
> >  appear to be considered.
> > 
> >  Should we set the -mmcu option to  multilib_flags instead of cflags in 
> >  the board config? Should we use --tool_opt in RUNTESTFLAGS? How do
> >  other targets handle this?
> > 
> >  Regards
> >  Senthil
> 
> Probably check-flags in target-supports-dg.exp should check cflags
> in the board_info along with the other flags.  Can you try that to
> see if it does what you need?
> 

Yes it does. The patch below did the job.

Is there a reason why cflags wasn't included before?

Regards
Senthil


diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index 2f6c4c2..bdf7476 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -304,6 +304,9 @@ proc check-flags { args } {
     # If running a subset of the test suite, $TEST_ALWAYS_FLAGS may not exist.
     catch {append compiler_flags " $TEST_ALWAYS_FLAGS "}
     set dest [target_info name]
+    if [board_info $dest exists cflags] {
+    append compiler_flags "[board_info $dest cflags] "
+    }
     if [board_info $dest exists multilib_flags] {
 	append compiler_flags "[board_info $dest multilib_flags] "
     }


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