From c0993dbe928fa5aee10ebe8d1aaaf07b24d88db9 Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 27 Nov 2007 17:06:12 +0000 Subject: * Makefile.in (ALL_TARGET_OBS): Remove object files that require 64-bit CORE_ADDR and BFD support, move them to ... (ALL_64_TARGET_OBS): ... this new variable. * configure.ac: Check for --enable-64-bit-bfd option. Only add 64-bit targets with --enable-targets=all if BFD supports 64-bit. * configure: Regenerate. * i386-cygwin-tdep.c (i386_cygwin_osabi_sniffer): Do not claim all elf32-i386 executables, only cygwin core files. --- gdb/configure.ac | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'gdb/configure.ac') diff --git a/gdb/configure.ac b/gdb/configure.ac index 0f1a3d8..107fdd6 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -101,6 +101,15 @@ AC_ARG_ENABLE(targets, *) enable_targets=$enableval ;; esac]) +# Check whether to enable 64-bit support on 32-bit hosts +AC_ARG_ENABLE(64-bit-bfd, +[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)], +[case "${enableval}" in + yes) want64=true ;; + no) want64=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;; +esac],[want64=false])dnl + # Provide defaults for some variables set by the per-host and per-target # configuration. gdb_host_obs=posix-hdep.o @@ -142,11 +151,36 @@ do ;; esac done + + # Check whether this target needs 64-bit CORE_ADDR + if test x${want64} = xfalse; then + . ${srcdir}/../bfd/config.bfd + fi fi done if test x${all_targets} = xtrue; then - TARGET_OBS='$(ALL_TARGET_OBS)' + + # We want all 64-bit targets if we either: + # - run on a 64-bit host or + # - already require 64-bit support for some other target or + # - the --enable-64-bit-bfd option was supplied + # Otherwise we only support all 32-bit targets. + # + # NOTE: This test must be in sync with the corresponding + # tests in BFD! + + if test x${want64} = xfalse; then + AC_CHECK_SIZEOF(long) + if test "x${ac_cv_sizeof_long}" = "x8"; then + want64=true + fi + fi + if test x${want64} = xtrue; then + TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' + else + TARGET_OBS='$(ALL_TARGET_OBS)' + fi fi AC_SUBST(TARGET_OBS) -- cgit v1.1