summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorrofl0r <retnyg@gmx.net>2014-03-19 22:31:00 +0100
committerrofl0r <retnyg@gmx.net>2014-03-19 22:31:02 +0100
commit8c820231edc91da57abff4b9a92187ada7fb1928 (patch)
tree4ecdc26252cd4012079ed8ae7d6af6dc6d58831e /configure
parent9505bfbc40fec217820abad7142663eda60cd6be (diff)
downloadmusl-8c820231edc91da57abff4b9a92187ada7fb1928.tar.gz
musl-8c820231edc91da57abff4b9a92187ada7fb1928.tar.bz2
musl-8c820231edc91da57abff4b9a92187ada7fb1928.tar.xz
musl-8c820231edc91da57abff4b9a92187ada7fb1928.zip
configure: check for __ILP32__ if arch is x86_64
otherwise a multilib compiler used with -mx32 will not be detected properly.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 4 insertions, 0 deletions
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