diff options
author | Ben Elliston <bje@gnu.org> | 2016-03-28 12:11:57 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-03-28 12:11:57 +1100 |
commit | 94b3b8a0155f6faec8b52e2d220ee7a970cad785 (patch) | |
tree | 0bb183060484aaed83959aee9b3d052add157225 | |
parent | aa17137860e32dfe5120528dfe462ebc018bba82 (diff) | |
download | dejagnu-94b3b8a0155f6faec8b52e2d220ee7a970cad785.zip dejagnu-94b3b8a0155f6faec8b52e2d220ee7a970cad785.tar.gz dejagnu-94b3b8a0155f6faec8b52e2d220ee7a970cad785.tar.bz2 |
* baseboards/multi-sim.exp: Indent properly.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | baseboards/multi-sim.exp | 124 |
2 files changed, 66 insertions, 62 deletions
@@ -1,5 +1,9 @@ 2016-03-28 Ben Elliston <bje@gnu.org> + * baseboards/multi-sim.exp: Indent properly. + +2016-03-28 Ben Elliston <bje@gnu.org> + * lib/rlogin.exp (rlogin_open): Return -1 if unable to spawn rlogin. Identified by Frink. diff --git a/baseboards/multi-sim.exp b/baseboards/multi-sim.exp index c057ccd..65c21c0 100644 --- a/baseboards/multi-sim.exp +++ b/baseboards/multi-sim.exp @@ -41,73 +41,73 @@ load_generic_config "sim" load_base_board_description "basic-sim" proc get_library_dirlist { args } { - global board - set compiler "[board_info $board compiler]" - set mflags "[board_info $board multilib_flags]" - set result [remote_exec host "$compiler $mflags --print-search-dirs"] - set regresult [regexp {(libraries: =)(\S*)} $result dummy1 dummy2 libdirlist] - if {$regresult == 0} { - perror "Could not find compilers library search path." - } - return [split $libdirlist :] + global board + set compiler "[board_info $board compiler]" + set mflags "[board_info $board multilib_flags]" + set result [remote_exec host "$compiler $mflags --print-search-dirs"] + set regresult [regexp {(libraries: =)(\S*)} $result dummy1 dummy2 libdirlist] + if {$regresult == 0} { + perror "Could not find compilers library search path." + } + return [split $libdirlist :] } proc dynamic_linker_flag { args } { - global board - set compiler "[board_info $board compiler]" - set mflags "[board_info $board multilib_flags]" - foreach i [get_library_dirlist] { - set dynlinker [glob -nocomplain -directory $i ld-*.so] - if { $dynlinker != "" } break - } - verbose "dynamic_linker_flag: -Wl,--dynamic-linker=$dynlinker" - return "-Wl,--dynamic-linker=$dynlinker" + global board + set compiler "[board_info $board compiler]" + set mflags "[board_info $board multilib_flags]" + foreach i [get_library_dirlist] { + set dynlinker [glob -nocomplain -directory $i ld-*.so] + if { $dynlinker != "" } break + } + verbose "dynamic_linker_flag: -Wl,--dynamic-linker=$dynlinker" + return "-Wl,--dynamic-linker=$dynlinker" } proc rpath_flags { args } { - global board - set compiler "[board_info $board compiler]" - set mflags "[board_info $board multilib_flags] [libgloss_include_flags] [newlib_include_flags] [libgloss_link_flags] [libgloss_link_flags]" - set rpathflags "" - set gccpath [get_multilibs] - foreach i {libgcc_s.so libstdc++.so libgfortran.so libatomic.so libgomp.so} { - set result [remote_exec host "$compiler $mflags --print-file-name=$i"] - set output [lindex $result 1] - set rpathdir [file dirname $output] - # If testing an installed compiler, --print-file-name will find the - # libraries, if testing a built but not installed compiler it will not - # find libraries like libstdc++.so or libgfortran.so so we add the - # extra hack/search so it can work. - if [string match "." $rpathdir] { - if [string match $i "libstdc++.so"] { - if [file exists "$gccpath/libstdc++-v3/src/.libs/libstdc++.so"] { - set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libstdc++-v3/src/.libs" - } - } - if [string match $i "libgfortran.so"] { - if [file exists "$gccpath/libgfortran/.libs/libgfortran.so"] { - set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libgfortran/.libs" - } - } - if [string match $i "libatomic.so"] { - if [file exists "$gccpath/libatomic/.libs/libatomic.so"] { - set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libatomic/.libs" - } - } - if [string match $i "libgomp.so"] { - if [file exists "$gccpath/libgomp/.libs/libgomp.so"] { - set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libgomp/.libs" - } - } - } else { - set rpathflags "$rpathflags -Wl,-rpath=$rpathdir" + global board + set compiler "[board_info $board compiler]" + set mflags "[board_info $board multilib_flags] [libgloss_include_flags] [newlib_include_flags] [libgloss_link_flags] [libgloss_link_flags]" + set rpathflags "" + set gccpath [get_multilibs] + foreach i {libgcc_s.so libstdc++.so libgfortran.so libatomic.so libgomp.so} { + set result [remote_exec host "$compiler $mflags --print-file-name=$i"] + set output [lindex $result 1] + set rpathdir [file dirname $output] + # If testing an installed compiler, --print-file-name will find the + # libraries, if testing a built but not installed compiler it will not + # find libraries like libstdc++.so or libgfortran.so so we add the + # extra hack/search so it can work. + if [string match "." $rpathdir] { + if [string match $i "libstdc++.so"] { + if [file exists "$gccpath/libstdc++-v3/src/.libs/libstdc++.so"] { + set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libstdc++-v3/src/.libs" + } + } + if [string match $i "libgfortran.so"] { + if [file exists "$gccpath/libgfortran/.libs/libgfortran.so"] { + set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libgfortran/.libs" + } + } + if [string match $i "libatomic.so"] { + if [file exists "$gccpath/libatomic/.libs/libatomic.so"] { + set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libatomic/.libs" + } + } + if [string match $i "libgomp.so"] { + if [file exists "$gccpath/libgomp/.libs/libgomp.so"] { + set rpathflags "$rpathflags -Wl,-rpath=$gccpath/libgomp/.libs" + } + } + } else { + set rpathflags "$rpathflags -Wl,-rpath=$rpathdir" + } } - } - foreach i [get_library_dirlist] { - set rpathflags "$rpathflags -Wl,-rpath=$i" - } - verbose "rpath_flags: $rpathflags" - return $rpathflags + foreach i [get_library_dirlist] { + set rpathflags "$rpathflags -Wl,-rpath=$i" + } + verbose "rpath_flags: $rpathflags" + return $rpathflags } # The TCL SIM variable takes precedence over the DEJAGNU_SIM env. variable @@ -152,6 +152,6 @@ if {[info exists env(DEJAGNU_SIM_OPTIONS)]} { if {[info exists env(DEJAGNU_SIM_BOARD_INFO)]} { foreach e $env(DEJAGNU_SIM_BOARD_INFO) { - set_board_info [lindex $e 0] [lindex $e 1] - } + set_board_info [lindex $e 0] [lindex $e 1] + } } |