OSDN Git Service

2009-04-30 David Ayers <ayers@fsfe.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / gfortran.exp
index 92a0641..a4d6e2b 100644 (file)
@@ -1,8 +1,9 @@
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009
+# Free Software Foundation, Inc.
 
 # This program 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 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
 #
 # This program is distributed in the hope that it will be useful,
@@ -11,8 +12,8 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
 
 # This file is just 'sed -e 's/77/fortran/g' \
 #                       -e 's/f2c/gfortran' g77.exp > gfortran.exp'
@@ -24,7 +25,9 @@
 #
 load_lib prune.exp
 load_lib gcc-defs.exp
+load_lib timeout.exp
 load_lib target-libpath.exp
+load_lib target-supports.exp
 
 #
 # GFORTRAN_UNDER_TEST is the compiler under test.
@@ -87,6 +90,9 @@ proc gfortran_link_flags { paths } {
 
     if { $gccpath != "" } {
       if [file exists "${gccpath}/libgfortran/.libs/libgfortran.a"] {
+          # Some targets use libgfortran.a%s in their specs, so they need a -B option
+          # for uninstalled testing.
+          append flags "-B${gccpath}/libgfortran/.libs "
           append flags "-L${gccpath}/libgfortran/.libs "
           append ld_library_path ":${gccpath}/libgfortran/.libs"
       }
@@ -172,6 +178,13 @@ proc gfortran_init { args } {
        lappend ALWAYS_GFORTRANFLAGS "additional_flags=$TOOL_OPTIONS"
     }
 
+    # On the SPU, most of the fortran test cases exceed local store size.
+    # Use automatic overlay support to make them fit.
+    if { [check_effective_target_spu_auto_overlay] } {
+       lappend ALWAYS_GFORTRANFLAGS "ldflags=-Wl,--auto-overlay"
+       lappend ALWAYS_GFORTRANFLAGS "ldflags=-Wl,--reserved-space=131072"
+    }
+
     verbose -log "ALWAYS_GFORTRANFLAGS set to $ALWAYS_GFORTRANFLAGS"
 
     verbose "gfortran is initialized" 3
@@ -193,6 +206,7 @@ proc gfortran_target_compile { source dest type options } {
     }
 
     lappend options "compiler=$GFORTRAN_UNDER_TEST"
+    lappend options "timeout=[timeout_value]"
 
     set options [concat "$ALWAYS_GFORTRANFLAGS" $options]
     set options [dg-additional-files-options $options $source]