diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2006-03-21 21:59:11 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2006-03-21 20:59:11 +0000 |
commit | ec23ed606daa42ee11510be00add6f2a6350d565 (patch) | |
tree | f6e4ea73d450d97d8eff8a07a819a047dcbb917b | |
parent | 5ded46ebfa8a73cd3931b3c1831d38dc4acea753 (diff) | |
download | gcc-ec23ed606daa42ee11510be00add6f2a6350d565.zip gcc-ec23ed606daa42ee11510be00add6f2a6350d565.tar.gz gcc-ec23ed606daa42ee11510be00add6f2a6350d565.tar.bz2 |
config.gcc (i[34567]86-*-solaris2*): Add config/sol2-10.h to tm_file on Solaris 10 and later.
2006-03-21 Eric Botcazou <ebotcazou@libertysurf.fr>
* config.gcc (i[34567]86-*-solaris2*): Add config/sol2-10.h to
tm_file on Solaris 10 and later.
(sparc64-*-solaris2*): Likewise.
(sparc-*-solaris2*): Likewise.
* config/sol26.h: Rename to config/sol2-6.h.
* config/sol2-10.h: New file.
testsuite/
* gcc.dg/builtins-config.h (Solaris case): Define HAVE_C99_RUNTIME
if _STDC_C99 is defined.
* gcc.dg/builtins-18.c: Pass -std=c99 on Solaris.
* gcc.dg/builtins-20.c: Likewise.
* gcc.dg/builtins-53.c: Likewise.
* gcc.dg/single-precision-constant.c: Likewise. Also pass
-mmacosx-version-min=10.3 on PowerPC/Darwin.
From-SVN: r112255
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config.gcc | 20 | ||||
-rw-r--r-- | gcc/config/sol2-10.h | 24 | ||||
-rw-r--r-- | gcc/config/sol2-6.h (renamed from gcc/config/sol26.h) | 0 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-18.c | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-20.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-53.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-config.h | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/single-precision-constant.c | 4 |
10 files changed, 76 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc64df9..176ce656 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2006-03-21 Eric Botcazou <ebotcazou@libertysurf.fr> + + * config.gcc (i[34567]86-*-solaris2*): Add config/sol2-10.h to + tm_file on Solaris 10 and later. + (sparc64-*-solaris2*): Likewise. + (sparc-*-solaris2*): Likewise. + * config/sol26.h: Rename to config/sol2-6.h. + * config/sol2-10.h: New file. + 2006-03-21 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/26781 diff --git a/gcc/config.gcc b/gcc/config.gcc index dd411de..92dce31 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1149,7 +1149,11 @@ i[34567]86-*-solaris2*) tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h svr4.h i386/sysv4.h sol2.h" case ${target} in *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) - tm_file="${tm_file} sol26.h" + tm_file="${tm_file} sol2-6.h" + ;; + *-*-solaris2.1[0-9]*) + tm_file="${tm_file} sol2-10.h" + ;; esac tm_file="${tm_file} i386/sol2.h" tmake_file="t-sol2 i386/t-sol2 t-svr4" @@ -2113,7 +2117,13 @@ sparc-*-rtems*) extra_parts="crti.o crtn.o crtbegin.o crtend.o" ;; sparc64-*-solaris2* | sparcv9-*-solaris2*) - tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h" + tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h" + case ${target} in + *-*-solaris2.1[0-9]*) + tm_file="${tm_file} sol2-10.h" + ;; + esac + tm_file="${tm_file} sparc/sol2.h sparc/sol2-64.h sparc/sol2-bi.h" if test x$gnu_ld = xyes; then tm_file="${tm_file} sparc/sol2-gld.h sparc/sol2-gld-bi.h" fi @@ -2142,7 +2152,11 @@ sparc-*-solaris2*) tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h" case ${target} in *-*-solaris2.[0-6] | *-*-solaris2.[0-6].*) - tm_file="${tm_file} sol26.h" + tm_file="${tm_file} sol2-6.h" + ;; + *-*-solaris2.1[0-9]*) + tm_file="${tm_file} sol2-10.h" + ;; esac tm_file="${tm_file} sparc/sol2.h" if test x$gnu_ld = xyes; then diff --git a/gcc/config/sol2-10.h b/gcc/config/sol2-10.h new file mode 100644 index 0000000..1da6bee --- /dev/null +++ b/gcc/config/sol2-10.h @@ -0,0 +1,24 @@ +/* Operating system specific defines to be used when targeting GCC for any + Solaris 2 system starting from Solaris 10. + Copyright 2006 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING. If not, write to +the Free Software Foundation, 51 Franklin Street, Fifth Floor, +Boston, MA 02110-1301, USA. */ + +/* Solaris 10 has the float and long double forms of math functions. */ +#undef TARGET_C99_FUNCTIONS +#define TARGET_C99_FUNCTIONS 1 diff --git a/gcc/config/sol26.h b/gcc/config/sol2-6.h index d5b7dda..d5b7dda 100644 --- a/gcc/config/sol26.h +++ b/gcc/config/sol2-6.h diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eafe67c1..372ab8c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2006-03-21 Eric Botcazou <ebotcazou@libertysurf.fr> + + * gcc.dg/builtins-config.h (Solaris case): Define HAVE_C99_RUNTIME + if _STDC_C99 is defined. + * gcc.dg/builtins-18.c: Pass -std=c99 on Solaris. + * gcc.dg/builtins-20.c: Likewise. + * gcc.dg/builtins-53.c: Likewise. + * gcc.dg/single-precision-constant.c: Likewise. Also pass + -mmacosx-version-min=10.3 on PowerPC/Darwin. + 2006-03-21 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/26781 diff --git a/gcc/testsuite/gcc.dg/builtins-18.c b/gcc/testsuite/gcc.dg/builtins-18.c index d04fe71..f4f64c1 100644 --- a/gcc/testsuite/gcc.dg/builtins-18.c +++ b/gcc/testsuite/gcc.dg/builtins-18.c @@ -8,6 +8,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -ffast-math" } */ /* { dg-options "-O2 -ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */ +/* { dg-options "-O2 -ffast-math -std=c99" { target *-*-solaris2* } } */ #include "builtins-config.h" @@ -33,9 +34,9 @@ main (void) if (__builtin_cabsf (fc) != 5.0F) link_error (); if (cabsf (3.0F + 4.0iF) != 5.0F) - link_failure (); + link_error (); if (__builtin_cabsf (3.0F + 4.0iF) != 5.0F) - link_failure (); + link_error (); #endif /* Test doubles. */ @@ -44,9 +45,9 @@ main (void) if (__builtin_cabs (dc) != 5.0) link_error (); if (cabs (3.0 + 4.0i) != 5.0) - link_failure (); + link_error (); if (__builtin_cabs (3.0 + 4.0i) != 5.0) - link_failure (); + link_error (); #ifdef HAVE_C99_RUNTIME /* Test long doubles. */ @@ -55,9 +56,9 @@ main (void) if (__builtin_cabsl (ldc) != 5.0L) link_error (); if (cabsl (3.0L + 4.0iL) != 5.0L) - link_failure (); + link_error (); if (__builtin_cabsl (3.0L + 4.0iL) != 5.0L) - link_failure (); + link_error (); #endif return 0; diff --git a/gcc/testsuite/gcc.dg/builtins-20.c b/gcc/testsuite/gcc.dg/builtins-20.c index a8ada8a..40a29c4 100644 --- a/gcc/testsuite/gcc.dg/builtins-20.c +++ b/gcc/testsuite/gcc.dg/builtins-20.c @@ -8,6 +8,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -ffast-math" } */ /* { dg-options "-O2 -ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */ +/* { dg-options "-O2 -ffast-math -std=c99" { target *-*-solaris2* } } */ #include "builtins-config.h" diff --git a/gcc/testsuite/gcc.dg/builtins-53.c b/gcc/testsuite/gcc.dg/builtins-53.c index 2b4b2f9..048cda9 100644 --- a/gcc/testsuite/gcc.dg/builtins-53.c +++ b/gcc/testsuite/gcc.dg/builtins-53.c @@ -11,6 +11,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ffast-math" } */ /* { dg-options "-O2 -ffast-math -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */ +/* { dg-options "-O2 -ffast-math -std=c99" { target *-*-solaris2* } } */ #include "builtins-config.h" diff --git a/gcc/testsuite/gcc.dg/builtins-config.h b/gcc/testsuite/gcc.dg/builtins-config.h index 6554f46..6921b80 100644 --- a/gcc/testsuite/gcc.dg/builtins-config.h +++ b/gcc/testsuite/gcc.dg/builtins-config.h @@ -11,8 +11,9 @@ #if defined(__hppa) && defined(__hpux) /* PA HP-UX doesn't have the entire C99 runtime. */ -#elif defined(__sun) -/* Solaris doesn't have the entire C99 runtime. */ +#elif defined(__sun) && ! defined (_STDC_C99) +/* Solaris up to 9 doesn't have the entire C99 runtime. + Solaris 10 defines _STDC_C99 if __STDC_VERSION__ is >= 199901L. */ #elif defined(__sgi) /* Irix6 doesn't have the entire C99 runtime. */ #elif defined(__FreeBSD__) && (__FreeBSD__ < 5) diff --git a/gcc/testsuite/gcc.dg/single-precision-constant.c b/gcc/testsuite/gcc.dg/single-precision-constant.c index e95eb39..3cf9f8f 100644 --- a/gcc/testsuite/gcc.dg/single-precision-constant.c +++ b/gcc/testsuite/gcc.dg/single-precision-constant.c @@ -1,8 +1,12 @@ /* Test that double precision constants are correctly handled when code is compiled with -fsingle-precision-constant */ /* Origin: Carlos O'Donell <carlos@codesourcery.com> */ + /* { dg-do run } */ /* { dg-options "-fsingle-precision-constant" } */ +/* { dg-options "-fsingle-precision-constant -mmacosx-version-min=10.3" { target powerpc-*-darwin* } } */ +/* { dg-options "-fsingle-precision-constant -std=c99" { target *-*-solaris2* } } */ + #include <math.h> #include <float.h> |