diff options
author | Ori Bernstein <orib@google.com> | 2012-09-27 15:18:32 -0400 |
---|---|---|
committer | Ori Bernstein <orib@google.com> | 2012-09-27 15:18:32 -0400 |
commit | 89c5d98244b1d106b9d1fab43312dc0ff308fed6 (patch) | |
tree | 4f393cb46978320860efc94bdf360f8388e642f6 | |
parent | 9860f8d3562c7391684f2a368ce84f15af0c42d4 (diff) | |
download | mc-89c5d98244b1d106b9d1fab43312dc0ff308fed6.tar.gz |
Add in '_start' to libstd.
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | libstd/bld.sh | 18 |
2 files changed, 11 insertions, 9 deletions
@@ -2,7 +2,7 @@ SUB = parse \ mi \ 6 \ util \ - libmyr + libstd include mk/c.mk include config.mk diff --git a/libstd/bld.sh b/libstd/bld.sh index eb7ec35..94a71ed 100755 --- a/libstd/bld.sh +++ b/libstd/bld.sh @@ -7,7 +7,8 @@ export PATH=.:$PATH export MC=../6/6m export MU=../util/muse -export CC=cc +export AS=as +export LD=ld export ASOPT="-g" case `uname` in Darwin) export SYS=osx;; @@ -26,21 +27,22 @@ function use { function build { for i in $@; do - N=`basename $i .myr` - - echo $MC $i && \ - $MC -I. $i + echo $MC $i + $MC -I. $i done } function assem { for i in $@; do - $CC $ASOPT -c $i + N=`basename $i .s` + + echo $AS -o $N.o $ASOPT $i + $AS -o $N.o $ASOPT $i done } # Library source. -ASM=syscall-$SYS.s +ASM="syscall-$SYS.s start-$SYS.s" MYR="types.myr \ sys-$SYS.myr \ die.myr \ @@ -65,7 +67,7 @@ ar -rcs libstd.a $OBJ # build test program build test.myr -COMP="$CC -o test test.o -L. -lstd" +COMP="$LD -o test test.o -L. -lstd" echo $COMP $COMP |