mirror of
git://c9x.me/qbe.git
synced 2026-04-05 09:59:47 +00:00
fix compiler command in testcc
This commit adds missing quotation marks around the argument to the function, and changes the value of `-x' option to `c` (lowercase) as per GCC manual [1]. [1]: https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Overall-Options.html
This commit is contained in:
parent
e54f7a0fda
commit
39b1f468b0
@ -11,7 +11,7 @@ exe=$tmp.exe
|
||||
out=$tmp.out
|
||||
|
||||
testcc() {
|
||||
echo "int main() { }" | $1 -x C -o /dev/null - >/dev/null 2>&1
|
||||
echo "int main() { }" | $1 -x c -o /dev/null - >/dev/null 2>&1
|
||||
return $?
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ init() {
|
||||
;;
|
||||
*)
|
||||
cc="cc -no-pie"
|
||||
testcc $cc || cc="cc"
|
||||
testcc "$cc" || cc="cc"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user