g77.exp (default_g77_version): Tweak to make it work in a build directory when nothing has been installed yet.

* lib/g77.exp (default_g77_version): Tweak to make it work in a build
        directory when nothing has been installed yet.

From-SVN: r20774
This commit is contained in:
Jeffrey A Law 1998-06-27 23:39:42 +00:00 committed by Jeff Law
parent 0bef9b8d88
commit a2c15e736d
2 changed files with 12 additions and 6 deletions

View File

@ -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

View File

@ -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)