From fc567f476a9cb381a50a94a355c4e0dd990b2539 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 2 Aug 2011 14:28:04 -0400 Subject: build: OS X 64-bit build R=rsc http://codereview.appspot.com/4838047 --- INSTALL | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'INSTALL') diff --git a/INSTALL b/INSTALL index 5f18e28f..e9928ca9 100755 --- a/INSTALL +++ b/INSTALL @@ -54,14 +54,32 @@ if [ `uname` = Linux ]; then if ./a.out >/dev/null then echo " NPTL found." - echo "SYSVERSION=2.6.x" >$PLAN9/config + echo "SYSVERSION=2.6.x" >>$PLAN9/config else echo " NPTL not found." - echo "SYSVERSION=2.4.x" >$PLAN9/config + echo "SYSVERSION=2.4.x" >>$PLAN9/config fi rm -f ./a.out fi +if [ `uname` = Darwin ]; then + # On Darwin, uname -m -p cannot be trusted. + echo "* Running on Darwin: checking architecture..." + rm -f ./a.out + gcc lib/darwin-main.c >/dev/null 2>&1 + case "$(file ./a.out 2>/dev/null)" in + *x86_64*) + echo " x86-64 found." + echo "OBJTYPE=x86_64" >>$PLAN9/config + ;; + *i386*) + echo " i386 found." + echo "OBJTYPE=386" >>$PLAN9/config + ;; + esac + rm -f ./a.out +fi + if [ -f LOCAL.config ]; then echo Using LOCAL.config options: sed 's/^/ /' LOCAL.config -- cgit v1.2.3