ref: e686640da8441d0cae0e45d5d6ef9f96c45a8e24
parent: 160d2c2b424adfbd456f61cb5e194888a054ff51
author: Ori Bernstein <[email protected]>
date: Thu May 14 19:29:49 EDT 2015
Fix plan9 build.
--- a/bld.proj
+++ b/bld.proj
@@ -3,6 +3,5 @@
libstd
libbio
libregex
- test
;;
--- a/libstd/bld.sub
+++ b/libstd/bld.sub
@@ -13,6 +13,7 @@
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
--- /dev/null
+++ b/libstd/errno+plan9.myr
@@ -1,0 +1,6 @@
+pkg std =
+ type errno = int
+ const Erange : errno = 1
+ const Emisc : errno = 2
+ const Eexist : errno = 3
+;;
--- a/libstd/ifreq+plan9.myr
+++ b/libstd/ifreq+plan9.myr
@@ -1,0 +1,2 @@
+pkg std =
+;;
--- a/libstd/wait+plan9.myr
+++ b/libstd/wait+plan9.myr
@@ -57,6 +57,8 @@
htput(statusmap, pid, status)
;;
;;
+ /* impossible */
+ -> `Waiterror
}
const parsestatus = {status -> (waitstatus, pid)
--- 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