#!/bin/sh
usage() { echo "Usage: $0 native | remote <hostname>"; exit 1; }
test $# -eq 0 && usage
test $1 = native -o \( $1 = remote -a $# = 2 \) || usage
test $1 = remote && export GCC_TARGET_HOSTNAME=$2
if [ $1 = native ] ; then board=cell-native; else board=cell-remote; fi
bin=/usr/bin
exec /usr/share/cell-gcc/test_installed \
  --with-testsuite=/usr/share/cell-gcc/testsuite \
  --with-gcc=$bin/spu-gcc \
  --with-g++=$bin/spu-g++ \
  --with-gfortran=$bin/spu-gfortran \
  --without-objc \
  --target spu-unknown-elf \
  --target_board $board
