2009-10-30 Nathan Sidwell * configure.ac (i[34567]86-*): Check if we're targetting x86-64 with an i686 compiler. * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if needed. * configure: Rebuilt. Index: configure =================================================================== Index: configure.ac =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/configure.ac,v retrieving revision 1.28 diff -c -3 -p -r1.28 configure.ac *** configure.ac 29 Oct 2009 17:43:44 -0000 1.28 --- configure.ac 2 Nov 2009 12:44:11 -0000 *************** ACX_BUGURL([http://www.gnu.org/software/ *** 73,78 **** --- 73,97 ---- AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description]) AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address]) + # Check for various supplementary target information (beyond the + # triplet) which might affect the choices in configure.srv. + case "${target}" in + changequote(,)dnl + i[34567]86-*-linux*) + changequote([,])dnl + AC_CACHE_CHECK([if building for x86-64], [gdb_cv_i386_is_x86_64], + [save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $CFLAGS" + AC_EGREP_CPP([got it], [ + #if __x86_64__ + got it + #endif + ], [gdb_cv_i386_is_x86_64=yes], + [gdb_cv_i386_is_x86_64=no]) + CPPFLAGS="$save_CPPFLAGS"]) + ;; + esac + . ${srcdir}/configure.srv if test "${srv_mingwce}" = "yes"; then Index: configure.srv =================================================================== RCS file: /cvs/src/src/gdb/gdbserver/configure.srv,v retrieving revision 1.46 diff -c -3 -p -r1.46 configure.srv *** configure.srv 31 Jul 2009 15:23:20 -0000 1.46 --- configure.srv 2 Nov 2009 12:44:11 -0000 *************** case "${target}" in *** 64,69 **** --- 64,72 ---- srv_tgtobj="i386-low.o win32-low.o win32-i386-low.o" ;; i[34567]86-*-linux*) srv_regobj=reg-i386-linux.o + if test "$gdb_cv_i386_is_x86_64" = yes ; then + srv_regobj="reg-x86-64-linux.o $srv_regobj" + fi srv_tgtobj="linux-low.o linux-x86-low.o i386-low.o i387-fp.o" srv_linux_usrregs=yes srv_linux_regsets=yes