configure: check for __ILP32__ if arch is x86_64
authorrofl0r <retnyg@gmx.net>
Wed, 19 Mar 2014 21:31:00 +0000 (22:31 +0100)
committerrofl0r <retnyg@gmx.net>
Wed, 19 Mar 2014 21:31:02 +0000 (22:31 +0100)
otherwise a multilib compiler used with -mx32 will not be detected
properly.

configure

index 3c01bf4d34ea7664f6f5d35856c572cfea5ff2f0..eb72a1e6c04d089f1fbf8228688c9972cb19b0bf 100755 (executable)
--- 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