diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-05-12 14:22:57 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-05-20 17:58:25 -0400 |
commit | df70eae24aecc7538e9b6a1189e9362c8a95d77d (patch) | |
tree | f8dadd637a9730dc88b797344e56fcdac6bbe872 /configure | |
parent | 45619f5c2309246ef9eac99f4ef01aea23f52ea7 (diff) | |
download | musl-df70eae24aecc7538e9b6a1189e9362c8a95d77d.tar.gz musl-df70eae24aecc7538e9b6a1189e9362c8a95d77d.tar.bz2 musl-df70eae24aecc7538e9b6a1189e9362c8a95d77d.tar.xz musl-df70eae24aecc7538e9b6a1189e9362c8a95d77d.zip |
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.
(cherry picked from commit 8945667fadc2eb71b7924bb4c5a69507fd362f4a)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 # |