[PATCH qbe] tools/test.sh: Without a TARGET, use $CC if defined
Export this patch
cc can be absent in Gentoo to make sure the right compiler is picked,
for example when clang is preferred or when cross-compiling.
Ok!
6cd5f70..2b451a2 master -> master
---
tools/test.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/test.sh b/tools/test.sh
index 536d240..4653b83 100755
--- a/tools/test.sh
+++ b/tools/test.sh
@@ -79,8 +79,8 @@ init() {
cc="cc"
;;
*)
- cc="cc -no-pie"
- testcc "$cc" || cc="cc"
+ cc="${CC:-cc} -no-pie"
+ testcc "$cc" || cc="${CC:-cc}"
;;
esac
TARGET=`$bin -t?`
--
2.35.1