ref: 14ce7d4eedd90cc6f6bcdb630f3ebbb843288067
parent: f93252591d7f9e80979259b24a571b72699e5d8e
author: cancel <cancel@cancel.fm>
date: Fri Nov 30 17:54:14 EST 2018
Add arch detection in build tool
--- a/tool
+++ b/tool
@@ -66,6 +66,12 @@
esac
done
+arch=
+case $(uname -m) in
+ x86_64) arch=x86_64;;
+ *) arch=unknown;;
+esac
+
warn() {
echo "Warning: $*" >&2
}
@@ -201,6 +207,11 @@
;;
*) fatal "Unknown build config \"$1\"";;
esac
+
+ case $arch in
+ x86_64) add cc_flags -march=nehalem;;
+ esac
+
add source_files field.c mark.c bank.c sim.c
case "$2" in
orca|cli)
@@ -239,6 +250,7 @@
fi
cat <<EOF
Operating system: $os
+Architecture: $arch
Compiler name: $cc_exe
Compiler type: $cc_id
Compiler version: $cc_vers