summaryrefslogtreecommitdiff
path: root/genbootstrap.sh
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-05-09 19:21:57 -0700
committerOri Bernstein <ori@eigenstate.org>2018-05-10 20:06:36 -0700
commita4f0ffa2a6755c7c0b8c1deb736d425540144ff7 (patch)
tree1a2cf3e81e4f74d361e8ee48146203c794e752e6 /genbootstrap.sh
parent3665783a1d1fe03db70cca452c615b439310a329 (diff)
downloadmc-a4f0ffa2a6755c7c0b8c1deb736d425540144ff7.tar.gz
Turn off fancy stuff when we have an old assembler.
Diffstat (limited to 'genbootstrap.sh')
-rwxr-xr-xgenbootstrap.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/genbootstrap.sh b/genbootstrap.sh
index 2a275e2..c4163d6 100755
--- a/genbootstrap.sh
+++ b/genbootstrap.sh
@@ -18,6 +18,22 @@ fi
cp obj/mbld/mbld xmbld
./xmbld -o '' clean
+tags(){
+ case `uname` in
+ *Linux*) echo -Tposixy -Tlinux;;
+ *Darwin*) echo -Tposixy -Tosx;;
+ *FreeBSD*) echo -Tposixy -Tfreebsd;;
+ *NetBSD*) echo -Tposixy -Tnetbsd;;
+ *OpenBSD*) echo -Tposixy -Topenbsd:6.2;;
+ *Plan9*) echo -Tplan9;;
+ esac
+ case `uname -m` in
+ *amd64*) echo -Tx64 ;;
+ *x86_64*) echo -Tx64 ;;
+ esac
+}
+
+
bootscript=mk/bootstrap/bootstrap+`uname -s`-`uname -m`.sh
echo '#!/bin/sh' > $bootscript
echo '# This script is generated by genbootstrap.sh' >> $bootscript
@@ -27,7 +43,7 @@ echo 'pwd=`pwd`' >> $bootscript
echo 'set -x' >> $bootscript
# mbld needs to be run without an output dir so we dont
# run into mkdir issues.
-./xmbld -o '' -j1 -Bnone mbld:mbld | \
+./xmbld -o '' -j1 -Bnone mbld:mbld `tags` | \
grep '^ ' | \
sed "s:`pwd`:\$pwd:g" | \
tee -a $bootscript