Patchwork [testsuite] Define TARGET_C99_FUNCTIONS/HAVE_C99_RUNTIME on IRIX 6.5

login
register
mail settings
Submitter Rainer Orth
Date Feb. 9, 2011, 3:08 p.m.
Message ID <ydd1v3hnt3l.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/82476/
State New
Headers show

Comments

Rainer Orth - Feb. 9, 2011, 3:08 p.m.
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*.
Tom G. Christensen - Feb. 10, 2011, 4:32 p.m.
On 02/09/2011 04:08 PM, Rainer Orth wrote:
> 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.
>
If seems to me that this effectively means IRIX < 6.5.18 is unsupported. 
If that's the case should the target specific notes not be amended 
accordingly?

-tgc
Rainer Orth - Feb. 10, 2011, 4:48 p.m.
Tom Christensen <tgc@jupiterrise.com> writes:

> On 02/09/2011 04:08 PM, Rainer Orth wrote:
>> 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.
>>
> If seems to me that this effectively means IRIX < 6.5.18 is unsupported. If

Not really: you will only see more testsuite failures on older
releases.  I don't think it's feasible to differentiate between IRIX
micro releases inside the code (except for the fact that configure tests
already test for feature availability individually).  I only test on
6.5.30 anyway, and given current bootstrap times (ca. 44 hours) on my
Onyx^2, I wonder how much longer I can continue to maintain the port.

> that's the case should the target specific notes not be amended
> accordingly?

They already state:

It is @emph{strongly} recommended to upgrade to at least IRIX 6.5.18.
This release introduced full ISO C99 support, though for the N32 and N64
ABIs only.

	Rainer
Tom G. Christensen - Feb. 10, 2011, 5:47 p.m.
On 02/10/2011 05:48 PM, Rainer Orth wrote:
> Tom Christensen<tgc@jupiterrise.com>  writes:
>
>> If seems to me that this effectively means IRIX<  6.5.18 is unsupported. If
>
> Not really: you will only see more testsuite failures on older
> releases.  I don't think it's feasible to differentiate between IRIX
> micro releases inside the code (except for the fact that configure tests
> already test for feature availability individually).

Thank you for clarifying this.
And I agree there is no need to differentiate between minor releases in 
the code.

>> that's the case should the target specific notes not be amended
>> accordingly?
>
> They already state:
>
> It is @emph{strongly} recommended to upgrade to at least IRIX 6.5.18.
> This release introduced full ISO C99 support, though for the N32 and N64
> ABIs only.
>
Yes, current text is fine in light of the above.

-tgc

Patch

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"
     }