X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=configure.ac;h=b24b33de781e0bdd7d314fb9ae1f82dd49faaf5b;hb=c7faa97a858bc4eedfca029176fd54c6196c3248;hp=30190d65bea669b88e1217cee3f0607efa678319;hpb=9aaf2a7e2c00987677b06bedda07c8b4f1445c70;p=deliverable%2Fbinutils-gdb.git diff --git a/configure.ac b/configure.ac index 30190d65be..b24b33de78 100644 --- a/configure.ac +++ b/configure.ac @@ -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}"