* configure.ac: Add user-friendly check for native x86_64-linux multilibs. * configur...
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Dec 2013 21:42:02 +0000 (21:42 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 16 Dec 2013 20:42:54 +0000 (13:42 -0700)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205975 138bc75d-0d04-0410-961f-82ee72b054a4

ChangeLog
configure
configure.ac

index f66f5523f544a15e57b410f28a055c4ff071fca8..2d78f36277032538bc1c25b089f286251fae6d6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-13  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
+
+       * configure.ac: Add user-friendly check for native x86_64-linux
+       multilibs.
+       * configure: Regenerate.
+
 2013-11-23  Alan Modra  <amodra@gmail.com>
 
        * config.sub, config.guess: Import from upstream.
index d4a82137bad55b4e5fd1eb189ba8f3ff42bcc890..749a35ea0a702e3f762039c73a1b8e684def78d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -7500,6 +7500,26 @@ if test x${is_cross_compiler} = xyes ; then
   target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
 fi
 
+# Special user-friendly check for native x86_64-linux build, if
+# multilib is not explicitly enabled.
+case "$target:$have_compiler:$host:$target:$enable_multilib" in
+  x86_64-*linux*:yes:$build:$build:)
+    # Make sure we have a developement environment that handles 32-bit
+    dev64=no
+    echo "int main () { return 0; }" > conftest.c
+    ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
+    if test $? = 0 ; then
+      if test -s conftest || test -s conftest.exe ; then
+       dev64=yes
+      fi
+    fi
+    rm -f conftest*
+    if test x${dev64} != xyes ; then
+      as_fn_error "I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib." "$LINENO" 5
+    fi
+    ;;
+esac
+
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
   target_configargs="--enable-multilib ${target_configargs}"
index 30190d65bea669b88e1217cee3f0607efa678319..b24b33de781e0bdd7d314fb9ae1f82dd49faaf5b 100644 (file)
@@ -2879,6 +2879,26 @@ if test x${is_cross_compiler} = xyes ; then
   target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
 fi
 
+# Special user-friendly check for native x86_64-linux build, if
+# multilib is not explicitly enabled.
+case "$target:$have_compiler:$host:$target:$enable_multilib" in
+  x86_64-*linux*:yes:$build:$build:)
+    # Make sure we have a developement environment that handles 32-bit
+    dev64=no
+    echo "int main () { return 0; }" > conftest.c
+    ${CC} -m32 -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c
+    if test $? = 0 ; then
+      if test -s conftest || test -s conftest.exe ; then
+       dev64=yes
+      fi
+    fi 
+    rm -f conftest*
+    if test x${dev64} != xyes ; then
+      AC_MSG_ERROR([I suspect your system does not have 32-bit developement libraries (libc and headers). If you have them, rerun configure with --enable-multilib. If you do not have them, and want to build a 64-bit-only compiler, rerun configure with --disable-multilib.])
+    fi
+    ;;
+esac
+
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
   target_configargs="--enable-multilib ${target_configargs}"
This page took 0.045757 seconds and 4 git commands to generate.