[testsuite] Define TARGET_C99_FUNCTIONS/HAVE_C99_RUNTIME on IRIX 6.5

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Wed Feb 9 15:08:00 GMT 2011


I've noticed that neither TARGET_C99_FUNCTIONS nor HAVE_C99_RUNTIME are
defined for IRIX 6.5 although that OS has full ISO C99 support since
IRIX 6.5.18.  The following patch corrects this.

Bootstrapped without regressions on mips-sgi-irix6.5 and verified that
the dg-require-effective-target c99_runtime tests change from
UNSUPPORTED to PASS.

Installed on mainline; this patch cannot be backported to 4.4 or 4.5
since those releases still support older IRIX 6 releases that lack the
required support.

	Rainer


2011-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* config/mips/iris6.h (TARGET_C99_FUNCTIONS): Define.

	gcc/testsuite:
	* gcc.dg/builtins-config.h: Remove __sgi handling.
	* lib/target-supports.exp (add_options_for_c99_runtime): Add
	-std=c99 for mips-sgi-irix6.5*.

diff -r 45a8368ad552 gcc/config/mips/iris6.h
--- a/gcc/config/mips/iris6.h	Fri Feb 04 17:16:00 2011 +0100
+++ b/gcc/config/mips/iris6.h	Fri Feb 04 17:16:47 2011 +0100
@@ -1,6 +1,6 @@
 /* Definitions of target machine for GNU compiler.  IRIX 6.5 version.
    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000,
-   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -38,6 +38,9 @@
   /* Configuration-independent MIPS rules.  */	\
   BASE_DRIVER_SELF_SPECS
 
+/* IRIX 6.5 has the float and long double forms of math functions.  */
+#define TARGET_C99_FUNCTIONS 1
+
 /* MIPS specific debugging info */
 #define MIPS_DEBUGGING_INFO 1
 
diff -r 45a8368ad552 gcc/testsuite/gcc.dg/builtins-config.h
--- a/gcc/testsuite/gcc.dg/builtins-config.h	Fri Feb 04 17:16:00 2011 +0100
+++ b/gcc/testsuite/gcc.dg/builtins-config.h	Fri Feb 04 17:16:47 2011 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2009 Free Software Foundation.
+/* Copyright (C) 2003, 2004, 2005, 2006, 2009, 2011 Free Software Foundation.
 
    Define macros useful in tests for bulitin functions.  */
 
@@ -11,8 +11,6 @@
 
 #if defined(__hppa) && defined(__hpux)
 /* PA HP-UX doesn't have the entire C99 runtime.  */
-#elif defined(__sgi)
-/* Irix6 doesn't have the entire C99 runtime.  */
 #elif defined(__AVR__)
 /* AVR doesn't have the entire C99 runtime.  */
 #elif defined(__FreeBSD__) && (__FreeBSD__ < 9)
diff -r 45a8368ad552 gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp	Fri Feb 04 17:16:00 2011 +0100
+++ b/gcc/testsuite/lib/target-supports.exp	Fri Feb 04 17:16:47 2011 +0100
@@ -3523,6 +3523,9 @@
     if { [istarget *-*-solaris2*] } {
 	return "$flags -std=c99"
     }
+    if { [istarget mips-sgi-irix6.5*] } {
+	return "$flags -std=c99"
+    }
     if { [istarget powerpc-*-darwin*] } {
 	return "$flags -mmacosx-version-min=10.3"
     }


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list