From e686640da8441d0cae0e45d5d6ef9f96c45a8e24 Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Thu, 14 May 2015 23:29:49 -0700 Subject: Fix plan9 build. --- bld.proj | 1 - libstd/bld.sub | 1 + libstd/errno+plan9.myr | 6 ++++++ libstd/ifreq+plan9.myr | 2 ++ libstd/wait+plan9.myr | 2 ++ mbldwrap.sh | 14 ++++++++++---- 6 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 libstd/errno+plan9.myr diff --git a/bld.proj b/bld.proj index f188846..1f23b30 100644 --- a/bld.proj +++ b/bld.proj @@ -3,6 +3,5 @@ sub = libstd libbio libregex - test ;; diff --git a/libstd/bld.sub b/libstd/bld.sub index 28b9409..3f01740 100644 --- a/libstd/bld.sub +++ b/libstd/bld.sub @@ -13,6 +13,7 @@ lib sys = ifreq+freebsd.myr ifreq+linux.myr ifreq+osx.myr + ifreq+plan9.myr ifreq.myr # dummy file: plan9 doesn't have ifreq util+plan9-x64.s util+posixy-x64.s diff --git a/libstd/errno+plan9.myr b/libstd/errno+plan9.myr new file mode 100644 index 0000000..c911349 --- /dev/null +++ b/libstd/errno+plan9.myr @@ -0,0 +1,6 @@ +pkg std = + type errno = int + const Erange : errno = 1 + const Emisc : errno = 2 + const Eexist : errno = 3 +;; diff --git a/libstd/ifreq+plan9.myr b/libstd/ifreq+plan9.myr index e69de29..ef73843 100644 --- a/libstd/ifreq+plan9.myr +++ b/libstd/ifreq+plan9.myr @@ -0,0 +1,2 @@ +pkg std = +;; diff --git a/libstd/wait+plan9.myr b/libstd/wait+plan9.myr index aa42b39..efe1a1c 100644 --- a/libstd/wait+plan9.myr +++ b/libstd/wait+plan9.myr @@ -57,6 +57,8 @@ const wait = {pid htput(statusmap, pid, status) ;; ;; + /* impossible */ + -> `Waiterror } const parsestatus = {status -> (waitstatus, pid) diff --git a/mbldwrap.sh b/mbldwrap.sh index 8a75691..83de5bf 100755 --- a/mbldwrap.sh +++ b/mbldwrap.sh @@ -1,12 +1,18 @@ #!/bin/sh -export MYR_MUSE=../muse/muse -export MYR_MC=../6/6m -export MYR_RT=../rt/_myrrt.o - # this should be a bourne compatible shell script. if test -f ./mbld/mbld; then ./mbld/mbld $@ +elif test `uname` = Plan9; then + echo "PLAN 9 BOOTSTRAP" + export MYR_MUSE=../muse/$O.out + export MYR_MC=../$O/$O.out + export MYR_RT=../rt/_myrrt.$O + ./bootstrap9.rc else + echo "POSIX BOOTSTRAP" + export MYR_MUSE=../muse/muse + export MYR_MC=../6/6m + export MYR_RT=../rt/_myrrt.o ./bootstrap.sh fi -- cgit v1.1