From d41d91ddd851798349f37d9bb75ed2718bbe28f5 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 18 Aug 2023 15:22:27 +0200 Subject: test.sh fixes for devuan linux --- tools/test.sh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tools') 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 -- cgit 1.4.1