From patchwork Tue Nov 20 18:43:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Zankel X-Patchwork-Id: 200605 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 3EAD82C0079 for ; Wed, 21 Nov 2012 19:30:44 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id DA93A3114E; Wed, 21 Nov 2012 08:30:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hf-rsVDZlb5v; Wed, 21 Nov 2012 08:30:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 26B5024DB5; Wed, 21 Nov 2012 08:30:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 444088F74A for ; Wed, 21 Nov 2012 08:30:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 90AE681F1A for ; Wed, 21 Nov 2012 08:30:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EAUetuHK-cu2 for ; Wed, 21 Nov 2012 08:30:36 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id B2CB681C3B for ; Wed, 21 Nov 2012 08:30:36 +0000 (UTC) Received: by mail-pa0-f43.google.com with SMTP id fb10so2661667pad.16 for ; Wed, 21 Nov 2012 00:30:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:from:date:subject:to:x-gm-message-state; bh=/DuWZv7/A8ngYnmAaIhL9AErkysiPzFXcoRAk7tmLHY=; b=GugbVjlt6VLrMjY4ySu06qf/cdAQvd+cSMMeNhRMsqgDiKRWpu7px1N3S/fphNTqmz jvw5fXWQ6MNr708jkcGOKRYA0SiAbMNqUi9mpNI9QfT5DtSbGuPOygI7wUZaR7seVefU T1zZN8m7YC1JkBtBgkjNYTC65FavLBI8ESyac8h+oCocq8cnNZe4EtHe1qrXLHXztcik O6wkyLT9TWu5KDz+PTAVx99ML5Oel9kyOLg6+WWyZO/OqjeZBtFUMERpazEE8jFahR5A kf4BvKHTvrszn1Bx8c6z0BpfpEMwCHbjZBHmaWwAFRLOcpOt2dcZLes13FMA364Fm3F+ Y7Bg== Received: by 10.66.89.98 with SMTP id bn2mr15682533pab.16.1353486178663; Wed, 21 Nov 2012 00:22:58 -0800 (PST) Received: from localhost (c-67-161-9-61.hsd1.ca.comcast.net. [67.161.9.61]) by mx.google.com with ESMTPS id kb3sm9550829pbc.27.2012.11.21.00.22.56 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 21 Nov 2012 00:22:58 -0800 (PST) Message-ID: <50ac8f62.a3c9440a.59e4.fffff6d9@mx.google.com> Received: by localhost (sSMTP sendmail emulation); Wed, 21 Nov 2012 00:22:56 -0800 From: Chris Zankel Date: Tue, 20 Nov 2012 10:43:59 -0800 To: buildroot@busybox.net X-Gm-Message-State: ALoCoQlkDNr3cr0BUNPI80xBkM6gGhcZuKeCPUyWdDp4/UDLkU1umxvd3FBMuFZAFt0nqHg6PddR Subject: [Buildroot] [PATCH 2/3] xtensa: fix target gdb build and 64-bit host side gdb X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Fix build breakage, use the version of the ptrace header file in asm instead of sys. Also, fix GDB running on 64 bit hosts. GDB was using unsigned long for 32-bit registers, but unsigned long is 64 bit on 64-bit hosts. Signed-off-by: Chris Zankel --- toolchain/gdb/7.4.1/xtensa-asm-ptrace-h.patch | 22 ++++++++++++++++++++++ toolchain/gdb/7.4.1/xtensa-gdb-regsize.patch | 19 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 toolchain/gdb/7.4.1/xtensa-asm-ptrace-h.patch create mode 100644 toolchain/gdb/7.4.1/xtensa-gdb-regsize.patch diff --git a/toolchain/gdb/7.4.1/xtensa-asm-ptrace-h.patch b/toolchain/gdb/7.4.1/xtensa-asm-ptrace-h.patch new file mode 100644 index 0000000..3d1b07c --- /dev/null +++ b/toolchain/gdb/7.4.1/xtensa-asm-ptrace-h.patch @@ -0,0 +1,22 @@ +--- gdb-7.4.1/gdb/xtensa-linux-nat.c.orig 2012-10-19 16:23:06.908165323 -0700 ++++ gdb-7.4.1/gdb/xtensa-linux-nat.c 2012-10-19 16:35:30.792134876 -0700 +@@ -36,7 +36,7 @@ + #include "gdb_wait.h" + #include + #include +-#include ++#include + + #include "gregset.h" + #include "xtensa-tdep.h" +--- gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c.orig 2012-10-19 16:24:06.260162894 -0700 ++++ gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c 2012-10-19 16:36:07.920133357 -0700 +@@ -23,7 +23,7 @@ + /* Defined in auto-generated file reg-xtensa.c. */ + void init_registers_xtensa (void); + +-#include ++#include + #include + + #include "xtensa-xtregs.c" diff --git a/toolchain/gdb/7.4.1/xtensa-gdb-regsize.patch b/toolchain/gdb/7.4.1/xtensa-gdb-regsize.patch new file mode 100644 index 0000000..e10bb8f --- /dev/null +++ b/toolchain/gdb/7.4.1/xtensa-gdb-regsize.patch @@ -0,0 +1,19 @@ +--- gdb-7.4.1/gdb/xtensa-tdep.h.orig 2012-10-30 11:40:23.546448594 -0700 ++++ gdb-7.4.1/gdb/xtensa-tdep.h 2012-10-30 11:41:43.078445337 -0700 +@@ -17,6 +17,7 @@ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + ++#include + + /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION + whenever the "tdep" structure changes in an incompatible way. */ +@@ -84,7 +85,7 @@ + /* Xtensa ELF core file register set representation ('.reg' section). + Copied from target-side ELF header . */ + +-typedef unsigned long xtensa_elf_greg_t; ++typedef uint32_t xtensa_elf_greg_t; + + typedef struct + {