aboutsummaryrefslogtreecommitdiff
path: root/lib/libgloss.exp
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2011-06-30 09:38:10 +1000
committerBen Elliston <bje@gnu.org>2011-06-30 09:38:10 +1000
commit6a76be5ff4edc64adc6478f8403a07a5dcd1e30f (patch)
tree8f0a35544d0a5d64fdd925a9baf0ffb01ddc5c48 /lib/libgloss.exp
parentbc123e2c554cc4e62a4ed46fbafb92a95a58819f (diff)
2011-06-30 Tom Tromey <tromey@redhat.com>
* doc/ref.xml: Document find_gfortran. * doc/dejagnu.texi: Regenerate. * lib/target.exp (default_target_compile): Handle f90. (default_target_compile): Likewise. * lib/libgloss.exp (find_gfortran): New proc.
Diffstat (limited to 'lib/libgloss.exp')
-rw-r--r--lib/libgloss.exp21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/libgloss.exp b/lib/libgloss.exp
index e651eb6..77150cb 100644
--- a/lib/libgloss.exp
+++ b/lib/libgloss.exp
@@ -1,5 +1,5 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -702,6 +702,25 @@ proc find_g77 {} {
return $CC
}
+proc find_gfortran {} {
+ global tool_root_dir
+
+ if {![is_remote host]} {
+ set file [lookfor_file $tool_root_dir gfortran]
+ if { $file == "" } {
+ set file [lookfor_file $tool_root_dir gcc/gfortran]
+ }
+ if { $file != "" } {
+ set CC "$file -B[file dirname $file]/"
+ } else {
+ set CC [transform gfortran]
+ }
+ } else {
+ set CC [transform gfortran]
+ }
+ return $CC
+}
+
proc find_gnatmake {} {
global tool_root_dir