OSDN Git Service

2009-04-30 David Ayers <ayers@fsfe.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / lib / gfortran.exp
index b0e66d8..a4d6e2b 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2004, 2005, 2007 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
@@ -26,6 +27,7 @@ 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.
@@ -88,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"
       }
@@ -173,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