diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-27 23:39:42 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-27 23:39:42 +0000 |
commit | fe7e2223a87a10fce9c9a607f016b24685a4e6bf (patch) | |
tree | 6a8f09b3d4d6cb6a4268223e006feeab95f4e2a9 /gcc | |
parent | 88bcc8842dde8b320bd65911af71f734768634e5 (diff) | |
download | gcc-fe7e2223a87a10fce9c9a607f016b24685a4e6bf.tar.gz |
* lib/g77.exp (default_g77_version): Tweak to make it work in a build
directory when nothing has been installed yet.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20774 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/g77.exp | 13 |
2 files changed, 12 insertions, 6 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e1d94e5324d..27da44aee3d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 28 00:37:26 1998 Jeffrey A Law (law@cygnus.com) + + * lib/g77.exp (default_g77_version): Tweak to make it work in a build + directory when nothing has been installed yet. + Sat Jun 27 23:23:18 1998 Carlo Wood <carlo@runaway.xs4all.nl> * gcc.c-torture/special/special.exp: Handle newer versions of diff --git a/gcc/testsuite/lib/g77.exp b/gcc/testsuite/lib/g77.exp index d4993e70459..3b2beb34b56 100644 --- a/gcc/testsuite/lib/g77.exp +++ b/gcc/testsuite/lib/g77.exp @@ -51,14 +51,15 @@ proc default_g77_version { } { # verify that the compiler exists if { $compiler_name != 0 } then { - set tmp [remote_exec host "$compiler -v"] - set status [lindex $tmp 0]; - set output [lindex $tmp 1]; - regexp "version.*$" $output version - if { $status == 0 && [info exists version] } then { + set options "" + + lappend options "additional_flags=-v" + set tmp [g77_target_compile "" "" "none" $options] + regexp "g77 version\[^\n\]*" $tmp version + if { [info exists version] } then { clone_output "$compiler_name $version\n" } else { - clone_output "Couldn't determine version of $compiler_name: $output\n" + clone_output "Couldn't determine version of $compiler_name: $tmp\n" } } else { # compiler does not exist (this should have already been detected) |