Browse Source

Add arch detection in build tool

master
cancel 6 years ago
parent
commit
14ce7d4eed
  1. 12
      tool

12
tool

@ -66,6 +66,12 @@ while getopts c:dhpsv-: opt_val; do
esac esac
done done
arch=
case $(uname -m) in
x86_64) arch=x86_64;;
*) arch=unknown;;
esac
warn() { warn() {
echo "Warning: $*" >&2 echo "Warning: $*" >&2
} }
@ -201,6 +207,11 @@ build_target() {
;; ;;
*) fatal "Unknown build config \"$1\"";; *) fatal "Unknown build config \"$1\"";;
esac esac
case $arch in
x86_64) add cc_flags -march=nehalem;;
esac
add source_files field.c mark.c bank.c sim.c add source_files field.c mark.c bank.c sim.c
case "$2" in case "$2" in
orca|cli) orca|cli)
@ -239,6 +250,7 @@ print_info() {
fi fi
cat <<EOF cat <<EOF
Operating system: $os Operating system: $os
Architecture: $arch
Compiler name: $cc_exe Compiler name: $cc_exe
Compiler type: $cc_id Compiler type: $cc_id
Compiler version: $cc_vers Compiler version: $cc_vers

Loading…
Cancel
Save