[RFA:] fix lack of #ifdef HAVE_C99_RUNTIME in builtins-20.c and elsewhere

Hans-Peter Nilsson hans-peter.nilsson@axis.com
Fri Jul 6 00:39:00 GMT 2007


> From: Geoff Keating <geoffk@apple.com>
> Date: Thu, 5 Jul 2007 17:06:42 -0700

> > +proc check_effective_target_c99_math { } {
> > +    global srcdir
> > +    return [check_no_compiler_messages c99_math assembly {
> > +	#include "builtins-config.h"
> > +	#ifndef HAVE_C99_RUNTIME
> > +	#error "No HAVE_C99_RUNTIME"
> > +	#endif
> > +    } -I$srcdir/gcc.dg ]
> > +}
> 
> This won't work when running the testsuite outside the build tree.   

Yes it will.  Is it that the name makes you think
"builtins-config.h" is a file in the *build tree*?  It's in the
source tree, and -I$srcdir/gcc.dg will make it accessible to the
gcc-under-test.  No reality-check performed though.

> Instead you need to either install the header file or have the  
> compiler #define something with underscores (eg.  
> __HAVE_C99_RUNTIME__).

I do believe the needs are met by
gcc/testsuite/gcc.dg/builtins-config.h

>  Patch is not OK.

Still so?

brgds, H-P



More information about the Gcc-patches mailing list