From: rofl0r Date: Wed, 19 Mar 2014 21:31:00 +0000 (+0100) Subject: configure: check for __ILP32__ if arch is x86_64 X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=8c820231edc91da57abff4b9a92187ada7fb1928;p=musl configure: check for __ILP32__ if arch is x86_64 otherwise a multilib compiler used with -mx32 will not be detected properly. --- diff --git a/configure b/configure index 3c01bf4d..eb72a1e6 100755 --- a/configure +++ b/configure @@ -410,6 +410,10 @@ printf "using compiler runtime libraries: %s\n" "$LIBCC" SUBARCH= t="$CFLAGS_C99FSE $CPPFLAGS $CFLAGS_AUTO $CFLAGS" +if test "$ARCH" = "x86_64" ; then +trycppif __ILP32__ "$t" && ARCH=x32 +fi + if test "$ARCH" = "arm" ; then trycppif __ARMEB__ "$t" && SUBARCH=${SUBARCH}eb trycppif __ARM_PCS_VFP "$t" && SUBARCH=${SUBARCH}hf