From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8124 invoked by alias); 2 Nov 2009 12:51:06 -0000 Received: (qmail 8110 invoked by uid 22791); 2 Nov 2009 12:51:04 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Nov 2009 12:50:59 +0000 Received: (qmail 32211 invoked from network); 2 Nov 2009 12:50:57 -0000 Received: from unknown (HELO ?192.168.44.101?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Nov 2009 12:50:57 -0000 Message-ID: <4AEED5B3.7020107@codesourcery.com> Date: Mon, 02 Nov 2009 12:51:00 -0000 From: Nathan Sidwell User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: x86-64 gdbserver config Content-Type: multipart/mixed; boundary="------------010707030408060404030509" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00018.txt.bz2 This is a multi-part message in MIME format. --------------010707030408060404030509 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 459 This patch allows building an x86-64 gdbserver for a multilibbed i686-pc-linux-gnu target. One cannot tell from the target triplet that x86-64 source files are needed -- one must invoke the compiler and examine the __x86_64__ #define. For instance, the CC_FOR_TARGET may be 'my-gcc -m64'. built and tested for an m64 multilib of an i686-pc-linux-gnu target. ok? nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery --------------010707030408060404030509 Content-Type: text/x-patch; name="x86-64.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="x86-64.patch" Content-length: 2307 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 --------------010707030408060404030509--