diff options
author | Rich Felker <dalias@aerifal.cx> | 2014-02-27 23:18:42 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014-02-27 23:18:42 -0500 |
commit | b1683a1d6a4391ffef6ce12be9aa172d0f4f59bc (patch) | |
tree | 52eb1e9245808f14580e892073856b78e606dc13 /configure | |
parent | 5c27c4458f11adaba261353f84bcde4f79f0bdbd (diff) | |
download | musl-b1683a1d6a4391ffef6ce12be9aa172d0f4f59bc.tar.gz musl-b1683a1d6a4391ffef6ce12be9aa172d0f4f59bc.tar.bz2 musl-b1683a1d6a4391ffef6ce12be9aa172d0f4f59bc.tar.xz musl-b1683a1d6a4391ffef6ce12be9aa172d0f4f59bc.zip |
add nofpu subarchs to the sh arch, and properly detect compiler's fpu config
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -421,8 +421,24 @@ fi test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \ && SUBARCH=${SUBARCH}el -test "$ARCH" = "sh" && trycppif __BIG_ENDIAN__ "$t" \ -&& SUBARCH=${SUBARCH}eb +if test "$ARCH" = "sh" ; then +trycppif __BIG_ENDIAN__ "$t" && SUBARCH=${SUBARCH}eb +if trycppif __SH_FPU_ANY__ ; then +# Some sh configurations are broken and replace double with float +# rather than using softfloat when the fpu is present but only +# supports single precision. Reject them. +printf "checking whether compiler's double type is IEEE double... " +echo 'typedef char dblcheck[(int)sizeof(double)-5];' >> "$tmpc" +if $CC $CFLAGS_C99FSE $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then +printf "yes\n" +else +printf "no\n" +fail "$0: error: compiler's floating point configuration is unsupported" +fi +else +SUBARCH=${SUBARCH}-nofpu +fi +fi test "$SUBARCH" \ && printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH" |