diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-09-25 14:41:25 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2017-09-25 14:41:25 +0200 |
commit | e54f7a0fda867f4cc7ae42bfaa6e38ad26034f7f (patch) | |
tree | 223e3e98ca2d7e190ae5dadd85247d833a39e978 /tools | |
parent | fedb1fa32cf71536bbc986182e78cd4437b1a63c (diff) | |
download | roux-e54f7a0fda867f4cc7ae42bfaa6e38ad26034f7f.tar.gz |
adjust test.sh for ubuntu
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/test.sh b/tools/test.sh index 384d585..6e55447 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -10,6 +10,11 @@ asm=$tmp.s exe=$tmp.exe out=$tmp.out +testcc() { + echo "int main() { }" | $1 -x C -o /dev/null - >/dev/null 2>&1 + return $? +} + init() { case "$TARGET" in arm64) @@ -31,7 +36,7 @@ init() { echo "Cannot find arm64 compiler or qemu." exit 1 fi - bin="$bin -t arm64" + bin="$bin -t arm64" ;; "") case `uname` in @@ -46,6 +51,7 @@ init() { ;; *) cc="cc -no-pie" + testcc $cc || cc="cc" ;; esac ;; |