blob: 753797c8f644a115c84ae225b68887732a355491 [file] [log] [blame]
rscdbd7b9a2003-11-23 18:29:08 +00001#!/bin/sh
2
3if [ $# != 1 ]; then
4 echo 'usage: 9a file.s' 1>&2
5 exit 1
6fi
7
Russ Coxfc567f42011-08-02 14:28:04 -04008test -f $PLAN9/config && . $PLAN9/config
9
Russ Coxfa662c92009-09-11 13:51:50 -040010aflags=""
Russ Coxfc567f42011-08-02 14:28:04 -040011case "`uname`-${OBJTYPE:-`uname -m`}" in
12Darwin-*386*)
13 aflags="-arch i386"
14 ;;
15Darwin-*x86_64*)
16 aflags="-arch x86_64"
17 ;;
Russ Coxfa662c92009-09-11 13:51:50 -040018esac
19
rscdbd7b9a2003-11-23 18:29:08 +000020out=`echo $1 | sed 's/\.s$//;s/$/.o/'`
Russ Coxfa662c92009-09-11 13:51:50 -040021exec as $aflags -o $out $1