summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-13 21:42:02 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-13 21:42:02 +0000
commit87ebeb4cb1caf22dbfd1d6cccb0d7847fabd1aaf (patch)
treef3dc8a59dcb1995ea5e15a624963fd3e39e038fe /configure
parent61cd3e5752228e5ccc59f971abe7aea068d894fd (diff)
downloadlinaro-gcc-87ebeb4cb1caf22dbfd1d6cccb0d7847fabd1aaf.tar.gz
linaro-gcc-87ebeb4cb1caf22dbfd1d6cccb0d7847fabd1aaf.tar.bz2
linaro-gcc-87ebeb4cb1caf22dbfd1d6cccb0d7847fabd1aaf.zip
* configure.ac: Add user-friendly check for native x86_64-linux
multilibs. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205975 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index d4a82137bad..749a35ea0a7 100755
--- 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}"