sys/mman.h: add MADV_WIPEONFORK from linux v4.14
[musl] / configure
index 02b736c..1e59c46 100755 (executable)
--- a/configure
+++ b/configure
@@ -598,6 +598,8 @@ tryldflag LDFLAGS_AUTO -Wl,-Bsymbolic-functions
 # Find compiler runtime library
 test -z "$LIBCC" && tryldflag LIBCC -lgcc && tryldflag LIBCC -lgcc_eh
 test -z "$LIBCC" && tryldflag LIBCC -lcompiler_rt
+test -z "$LIBCC" && try_libcc=`$CC -print-libgcc-file-name 2>/dev/null` \
+                 && tryldflag LIBCC "$try_libcc"
 test -z "$LIBCC" && try_libcc=`$CC -print-file-name=libpcc.a 2>/dev/null` \
                  && tryldflag LIBCC "$try_libcc"
 printf "using compiler runtime libraries: %s\n" "$LIBCC"
@@ -706,9 +708,8 @@ esac
 #
 printf "checking whether compiler's long double definition matches float.h... "
 echo '#include <float.h>' > "$tmpc"
-echo '#if LDBL_MANT_DIG == 53' >> "$tmpc"
-echo 'typedef char ldcheck[9-(int)sizeof(long double)];' >> "$tmpc"
-echo '#endif' >> "$tmpc"
+echo '#define C(m,s) (m==LDBL_MANT_DIG && s==sizeof(long double))' >> "$tmpc"
+echo 'typedef char ldcheck[(C(53,8)||C(64,12)||C(64,16)||C(113,16))*2-1];' >> "$tmpc"
 if $CC $CFLAGS_C99FSE \
   -I$srcdir/arch/$ARCH -I$srcdir/arch/generic -I$srcdir/include \
   $CPPFLAGS $CFLAGS -c -o /dev/null "$tmpc" >/dev/null 2>&1 ; then