summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-14 23:29:49 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-14 23:55:23 -0700
commite686640da8441d0cae0e45d5d6ef9f96c45a8e24 (patch)
treeaf0eafa29732bc148fd764211e32680e7149ec94
parent160d2c2b424adfbd456f61cb5e194888a054ff51 (diff)
downloadmc-e686640da8441d0cae0e45d5d6ef9f96c45a8e24.tar.gz
Fix plan9 build.
-rw-r--r--bld.proj1
-rw-r--r--libstd/bld.sub1
-rw-r--r--libstd/errno+plan9.myr6
-rw-r--r--libstd/ifreq+plan9.myr2
-rw-r--r--libstd/wait+plan9.myr2
-rwxr-xr-xmbldwrap.sh14
6 files changed, 21 insertions, 5 deletions
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