aboutsummaryrefslogtreecommitdiff
path: root/INSTALL
diff options
context:
space:
mode:
authorRuss Cox <rsc@swtch.com>2011-08-02 14:28:04 -0400
committerRuss Cox <rsc@swtch.com>2011-08-02 14:28:04 -0400
commitfc567f476a9cb381a50a94a355c4e0dd990b2539 (patch)
tree9bfabb0a7d3c13f6e853b47e0eae7e7d9c888c31 /INSTALL
parentbabe3439cc2bb8baa027be65da67d02d980ebb05 (diff)
downloadplan9port-fc567f476a9cb381a50a94a355c4e0dd990b2539.tar.gz
plan9port-fc567f476a9cb381a50a94a355c4e0dd990b2539.tar.bz2
plan9port-fc567f476a9cb381a50a94a355c4e0dd990b2539.zip
build: OS X 64-bit build
R=rsc http://codereview.appspot.com/4838047
Diffstat (limited to 'INSTALL')
-rwxr-xr-xINSTALL22
1 files changed, 20 insertions, 2 deletions
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