cleaned up tests to work like they did originally in the makefile

This commit is contained in:
Jeffrey Wheat 1993-08-12 23:19:09 +00:00
parent 9e191927ab
commit 26f709de0f
2 changed files with 47 additions and 6 deletions

View File

@ -71,5 +71,38 @@ proc ld_exit {} {
# relink the linker
#
proc ld_start { ld target } {
default_ld_start $ld $target
#
}
#
# ld_relocate
# link an object using relocation
#
proc ld_relocate { ld target objects } {
default_ld_relocate $ld $target $objects
}
#
# ld_link
# link a program using ld
#
proc ld_link { ld target objects } {
default_ld_link $ld $target $objects
}
#
# ld_compile
# compile an object using $cc
#
proc ld_compile { cc source object } {
default_ld_compile $cc $source $object
}
#
# ld_exec
# execute ithe target
#
proc ld_exec { target output } {
default_ld_exec $target $output
}

View File

@ -28,8 +28,18 @@ if $tracelevel then {
set tmpdir /tmp
set stage 0
# link the target with itself
ld_start $objdir/ld.new $tmpdir/ld.$stage
#
# link an object using relocation
#
ld_relocate $objdir/ld.new $tmpdir/ld-partial.o $OFILES
ld_link $objdir/ld.new $tmpdir/ld.partial $tmpdir/ld-partial.o
ld_link $tmpdir/ld.partial $tmpdir/ld.full $OFILES
ld_link $tmpdir/ld.full $tmpdir/ld.$stage $OFILES
#
# main test loop
@ -53,7 +63,7 @@ for { set stage 0 } { $stage < 9 } { incr stage } {
verbose "### stage is now $stage\n" 1
# link the target with itself
ld_start $ld_old $ld_new
ld_link $ld_old $ld_new $OFILES
# load (compare) the target
if ![file exists $ld_old] then {
@ -87,5 +97,3 @@ catch "exec rm -f $ld_old" result
verbose "### EXEC rm -f $ld_old $ld_new"
catch "exec rm -f $ld_old $ld_new" result
ld_exit