diff --git a/configure b/configure index e8a990b01396d4b11de0d639a9be1e337cb656f2..5d956723cead5e0f86d06e6f7c5cebae153a33cc 100755 --- a/configure +++ b/configure @@ -189,6 +189,15 @@ trycc ${CROSS_COMPILE}cc printf "%s\n" "$CC" 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 #