ask crossdev for portage arch

Rather than hardcode the tuple<->portage arch map ourselves, ask
the new crossdev version for it.

BUG=chromium-os:26998
TEST=`cbuildbot chromiumos-sdk` works

Change-Id: Ib355d1bfef25beb88164007f116f32132ca83ae9
Reviewed-on: https://gerrit.chromium.org/gerrit/16982
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
diff --git a/toolchain_utils.sh b/toolchain_utils.sh
index 4f02bb5..a4ff8d3 100755
--- a/toolchain_utils.sh
+++ b/toolchain_utils.sh
@@ -25,16 +25,14 @@
 {
   local ctarget=$(get_ctarget_from_board "$@")
 
-  case ${ctarget} in
-  arm*)    echo "arm" ;;
-  i?86*)   echo "x86" ;;
-  x86_64*) echo "amd64" ;;
-  *)
+  # Ask crossdev what the magical portage arch is!
+  local arch=$(eval $(crossdev --show-target-cfg "${ctarget}"); echo ${arch})
+  if [[ -z ${arch} ]] ; then
     error "Unable to determine ARCH from toolchain: ${ctarget}"
     return 1
-    ;;
-  esac
+  fi
 
+  echo "${arch}"
   return 0
 }