Browse Source

* baseboards/multi-sim.exp: Indent properly.

dejagnu-1.6
Ben Elliston 11 years ago
parent
commit
94b3b8a015
  1. 4
      ChangeLog
  2. 124
      baseboards/multi-sim.exp

4
ChangeLog

@ -1,3 +1,7 @@
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

124
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]
}
}

Loading…
Cancel
Save