提交 8945667f 编写于 作者: R Rich Felker

add configure check for working compiler

without this, broken choices of CC/CPPFLAGS/CFLAGS don't show up until
late in the configure process where they are confusingly reported as a
different failure such as incorrect long double type.
上级 ac0acd56
...@@ -189,6 +189,15 @@ trycc ${CROSS_COMPILE}cc ...@@ -189,6 +189,15 @@ trycc ${CROSS_COMPILE}cc
printf "%s\n" "$CC" printf "%s\n" "$CC"
test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; } test -n "$CC" || { echo "$0: cannot find a C compiler" ; exit 1 ; }
printf "checking whether C compiler works... "
echo "typedef int x;" > "$tmpc"
if output=$($CC $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" 2>&1) ; then
printf "yes\n"
else
printf "no; compiler output follows:\n%s\n" "$output"
exit 1
fi
# #
# Only build musl-gcc wrapper if toolchain does not already target musl # Only build musl-gcc wrapper if toolchain does not already target musl
# #
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册