This is the mail archive of the gcc-patches@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: [PATCH] testsuite: Add new effective target keywords


On Mon, 18 Apr 2005, [utf-8] BjÃrn Haase wrote:

> While I think that such kind of information logically should belong to the 
> target board description, I agree that it would be better if one had a 
> solution that is independent of dejagnu.
> I'd like to suggest to use a method similar to the case of profiling. There, 
> e.g. already is such a hard-coded list of targets in "target-supports.exp" so 
> one might consider to extend the check_effective_target_support_trampolines 
> procedure my patch is proposing so that it first looks at the board_info 
> variable and in case that it does not find anything there, looks at a 
> hand-coded selection list. ?

That seems like the right way to me.

> > As for whether int is more than 16 bits, the testsuite harness should be
> > able to determine that for itself (for each multilib) by testing the
> > compiler just as it does e.g. to test for availability of -fpic or iconv
> > or ilp32 or lp64. 
> 
> Of course that would be desireable. It would be even better, if there were a 
> reliable define symbol that could be used for compile switches, so that some 
> tests need not to be skipped but could be adapted.

#if __INT_MAX__ < 2147483647
or
#if __INT_MAX__ > 32767

can be used to adapt tests depending on the size of int.  There are plenty 
of __INT_MAX__ conditionals in whatever form already in the testsuite.  
You can use any of the macros documented in cpp.texi.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)

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