Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "H.J. Lu" <hongjiu.lu@intel.com>
To: GDB <gdb-patches@sourceware.org>
Subject: PATCH: PR testsuite/12040: GDB Fortran tests use g77 instead of gfortran
Date: Tue, 21 Sep 2010 18:24:00 -0000	[thread overview]
Message-ID: <20100920135856.GA27953@intel.com> (raw)

This isn't a proper fix since it depends on we load lib/ada.exp before
any Fortran tests.  I think ada.exp is the wrong place to provide
GDB functions.  It should be placed in something like gdb-support.exp and
ada.exp/fortran.exp can just load it.


H.J.
---
2010-09-20  H.J. Lu  <hongjiu.lu@intel.com>

	PR testsuite/12040
	* lib/ada.exp (gdb_find_gfortran): New.
	(gdb_default_target_compile): Use it.

diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
index 055d4d3..1e686bc 100644
--- a/gdb/testsuite/lib/ada.exp
+++ b/gdb/testsuite/lib/ada.exp
@@ -41,6 +41,25 @@ proc gdb_find_gnatmake {} {
     return $GM
 }   
 
+proc gdb_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
+}
+
 # FIXME:brobecker/2004-03-31:
 # The following function is a copy of the function of the same name provided
 # by dejagnu, except that it has been modified to add support for building
@@ -112,7 +131,7 @@ proc gdb_default_target_compile {source destfile type options} {
 	    if [board_info $dest exists f77compiler] {
 		set compiler [target_info f77compiler]
 	    } else {
-		set compiler [find_g77]
+		set compiler [gdb_find_gfortran]
 	    }
 	}
 


             reply	other threads:[~2010-09-20 13:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21 18:24 H.J. Lu [this message]
2011-06-28 19:35 ` Tom Tromey
2011-06-28 19:56   ` H.J. Lu
2011-06-29 14:44     ` Tom Tromey
2011-06-29 14:51       ` H.J. Lu
2011-06-29 14:58         ` Tom Tromey
2011-06-29 17:50           ` Tom Tromey
2011-06-29 17:52             ` H.J. Lu
2011-06-29 18:26               ` Tom Tromey
2011-06-29 18:29                 ` H.J. Lu
2011-06-30 13:29                   ` Tom Tromey
2011-06-29 20:45             ` Jan Kratochvil
2011-06-29 20:49               ` Tom Tromey
2011-06-29 20:56                 ` Jan Kratochvil
2011-06-29 16:10   ` Joel Brobecker
2011-06-29 17:35     ` Tom Tromey
2011-06-29 17:58       ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100920135856.GA27953@intel.com \
    --to=hongjiu.lu@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox