Browse Source

tools/test.sh: Without a TARGET, use $CC if defined

cc can be absent in Gentoo to make sure the right compiler is picked,
for example when clang is preferred or when cross-compiling.
Haelwenn (lanodan) Monnier 3 years ago
parent
commit
2b451a28d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      tools/test.sh

+ 2 - 2
tools/test.sh

@@ -79,8 +79,8 @@ init() {
 			cc="cc"
 			cc="cc"
 			;;
 			;;
 		*)
 		*)
-			cc="cc -no-pie"
-			testcc "$cc" || cc="cc"
+			cc="${CC:-cc} -no-pie"
+			testcc "$cc" || cc="${CC:-cc}"
 			;;
 			;;
 		esac
 		esac
 		TARGET=`$bin -t?`
 		TARGET=`$bin -t?`