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 --- bin/9a | 12 +++++++++--- bin/9c | 2 ++ bin/9l | 3 +++ 3 files changed, 14 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/9a b/bin/9a index 7ee8beb4..753797c8 100755 --- a/bin/9a +++ b/bin/9a @@ -5,10 +5,16 @@ if [ $# != 1 ]; then exit 1 fi +test -f $PLAN9/config && . $PLAN9/config + aflags="" -case "`uname`" in -Darwin) - aflags="-arch `arch`" +case "`uname`-${OBJTYPE:-`uname -m`}" in +Darwin-*386*) + aflags="-arch i386" + ;; +Darwin-*x86_64*) + aflags="-arch x86_64" + ;; esac out=`echo $1 | sed 's/\.s$//;s/$/.o/'` diff --git a/bin/9c b/bin/9c index bfdac4ca..34238e93 100755 --- a/bin/9c +++ b/bin/9c @@ -70,6 +70,8 @@ case "$tag" in *FreeBSD*gcc*) usegcc ;; *FreeBSD*clang*) useclang ;; *BSD*) usegcc ;; +*Darwin-x86_64*) usegcc + cflags="$ngflags -g3 -no-cpp-precomp -m64" ;; *Darwin*) usegcc cflags="$ngflags -g3 -no-cpp-precomp -m32" ;; *HP-UX*) cc=${CC9:-cc}; cflags="-g -O -c -Ae" ;; diff --git a/bin/9l b/bin/9l index e3fa3091..68d099e3 100755 --- a/bin/9l +++ b/bin/9l @@ -45,6 +45,9 @@ case "$tag" in ;; esac ;; +*Darwin*x86_64*) + ld="${CC9:-gcc} -m64" + ;; *Darwin*) ld="${CC9:-gcc} -m32" ;; -- cgit v1.2.3