2005-06-07 05:13:31 +08:00
|
|
|
source "site.exp"
|
|
|
|
|
|
|
|
if { ! [isnative] } {
|
|
|
|
verbose "skipping cygload because it's not native \"$target_triplet\" != \"$build_triplet\""
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
proc ws_spawn {cmd args} {
|
|
|
|
global rv
|
|
|
|
verbose "running $cmd\n"
|
|
|
|
set rv {}
|
|
|
|
# First item in rv is the return code, second item is the message
|
|
|
|
lappend rv [catch "exec $cmd" message] $message
|
|
|
|
verbose send "catchCode = $rv\n"
|
|
|
|
}
|
|
|
|
|
2022-08-24 23:01:52 +08:00
|
|
|
if { $verbose } {
|
|
|
|
set redirect_output "./mingw-cygwin.log"
|
2020-11-27 00:50:43 +08:00
|
|
|
} else {
|
2022-08-24 23:01:52 +08:00
|
|
|
set redirect_output /dev/null
|
2020-11-27 00:50:43 +08:00
|
|
|
}
|
|
|
|
|
2022-08-24 23:01:52 +08:00
|
|
|
set windows_runtime_root [exec cygpath -m $runtime_root]
|
|
|
|
ws_spawn "./mingw/cygload.exe -cygwin $windows_runtime_root/cygwin1.dll > $redirect_output"
|
2005-06-07 05:13:31 +08:00
|
|
|
if { $rv != {0 {}} } {
|
2022-08-24 23:01:52 +08:00
|
|
|
verbose -log "cygload: $rv"
|
|
|
|
fail "cygload"
|
2005-06-07 05:13:31 +08:00
|
|
|
} else {
|
2022-08-24 23:01:52 +08:00
|
|
|
pass "cygload"
|
2005-06-07 05:13:31 +08:00
|
|
|
}
|