From fa662c9571e92d5fc4f36414723bbaed1e11b278 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 11 Sep 2009 13:51:50 -0400 Subject: INSTALL: fix build on Snow Leopard http://codereview.appspot.com/116073 --- bin/9a | 8 +++++++- bin/9c | 4 ++-- bin/9l | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/9a b/bin/9a index f2984ffb..8178d24c 100755 --- a/bin/9a +++ b/bin/9a @@ -5,5 +5,11 @@ if [ $# != 1 ]; then exit 1 fi +aflags="" +case "`uname`" in +Darwin) + aflags="-arch i386" +esac + out=`echo $1 | sed 's/\.s$//;s/$/.o/'` -exec as -o $out $1 +exec as $aflags -o $out $1 diff --git a/bin/9c b/bin/9c index 8ee137ee..adcee2a1 100755 --- a/bin/9c +++ b/bin/9c @@ -25,7 +25,7 @@ tag="${SYSNAME:-`uname`}-${OBJTYPE:-`uname -m`}-${CC9:-cc}" case "$tag" in *BSD*) usegcc ;; *Darwin*) usegcc - cflags="$ngflags -g3 -no-cpp-precomp" ;; + cflags="$ngflags -g3 -no-cpp-precomp -m32" ;; *HP-UX*) cc=cc; cflags="-g -O -c -Ae" ;; *Linux*) usegcc case "${CC9:-gcc}" in @@ -76,7 +76,7 @@ xtmp=/tmp/9c.$$.$USER.out $cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp status=$? grep -v '__p9l_autolib_' $xtmp | -egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|In file included from| from|use of C99 long long|ISO C forbids conversion|Cursor. is deprecated|warn_unused_result' | +egrep -v ': error: .Each undeclared identifier|: error: for each function it appears|is dangerous, better use|is almost always misused|: In function |: At top level:|support .long long.|In file included from| from|use of C99 long long|ISO C forbids conversion|is deprecated|warn_unused_result' | sed 's/ .first use in this function.$//; s/\"\([^\"][^\"]*\)\", line \([0-9][0-9]*\)/\1:\2/g' | uniq 1>&2 rm -f $xtmp $xtmp.status diff --git a/bin/9l b/bin/9l index 06939b45..2659db50 100755 --- a/bin/9l +++ b/bin/9l @@ -46,7 +46,7 @@ case "$tag" in esac ;; *Darwin*) - ld=gcc + ld="gcc -m32" ;; *SunOS*) ld="${CC9:-cc} -g" -- cgit v1.2.3