diff options
author | Quentin Carbonneaux <quentin@c9x.me> | 2023-08-18 15:22:27 +0200 |
---|---|---|
committer | Quentin Carbonneaux <quentin@c9x.me> | 2023-08-18 17:21:48 +0200 |
commit | d41d91ddd851798349f37d9bb75ed2718bbe28f5 (patch) | |
tree | ce6d14f18d965c07868a67f19b8545ce01061a60 /tools | |
parent | 36946a5142c40b733d25ea5ca469f7949ee03439 (diff) | |
download | roux-d41d91ddd851798349f37d9bb75ed2718bbe28f5.tar.gz |
test.sh fixes for devuan linux
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/test.sh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tools/test.sh b/tools/test.sh index 4412f61..fa782c3 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -1,6 +1,6 @@ #!/bin/sh -dir=`cd $(dirname "$0"); pwd` +dir=`dirname "$0"` bin=$dir/../qbe binref=$dir/../qbe.ref @@ -12,11 +12,6 @@ asmref=$tmp.ref.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) @@ -79,8 +74,8 @@ init() { cc="cc -lpthread" ;; *) - cc="${CC:-cc} -lpthread" - testcc "$cc" || cc="${CC:-cc}" + cc="${CC:-cc}" + ccpost="-lpthread" ;; esac TARGET=`$bin -t?` @@ -154,7 +149,7 @@ once() { src="$asm" fi - if ! $cc -g -o $exe $src + if ! $cc -g -o $exe $src $ccpost then echo "[cc fail]" return 1 |