From patchwork Sun May 6 09:39:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 157058 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 72160B6FBA for ; Sun, 6 May 2012 19:39:56 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E781F8C0E0; Sun, 6 May 2012 09:39:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lG6zKo2IXeON; Sun, 6 May 2012 09:39:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 36F238C118; Sun, 6 May 2012 09:39:42 +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 146A68F753 for ; Sun, 6 May 2012 09:39:37 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D747F8B663 for ; Sun, 6 May 2012 09:39:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jFZvdv0Tvoow for ; Sun, 6 May 2012 09:39:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [88.190.12.23]) by whitealder.osuosl.org (Postfix) with ESMTP id AB7AF8C0D3 for ; Sun, 6 May 2012 09:39:34 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 9952913E; Sun, 6 May 2012 11:39:33 +0200 (CEST) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id 8779216A for ; Sun, 6 May 2012 11:39:23 +0200 (CEST) From: Thomas Petazzoni To: buildroot@busybox.net Date: Sun, 6 May 2012 11:39:20 +0200 Message-Id: <92316b7267b614887d3186bcb585dc39206b0a85.1336297156.git.thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Subject: [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc 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 Fixes build failures like http://autobuild.buildroot.org/results/112fa7c56e1e31c9a81d5f27394f58789e36bfec/build-end.log. Signed-off-by: Thomas Petazzoni --- .../valgrind-3.7.0-dont-include-a-out-header.patch | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 package/valgrind/valgrind-3.7.0-dont-include-a-out-header.patch diff --git a/package/valgrind/valgrind-3.7.0-dont-include-a-out-header.patch b/package/valgrind/valgrind-3.7.0-dont-include-a-out-header.patch new file mode 100644 index 0000000..ed1c939 --- /dev/null +++ b/package/valgrind/valgrind-3.7.0-dont-include-a-out-header.patch @@ -0,0 +1,45 @@ +Add replacement for + +Valgrind includes to get the definition of 'struct +nlist'. However, while glibc directly defines 'struct nlist' in +, uClibc relies on it being defined by kernel headers (i.e + simply includes ). This works for most +architectures, but not for PowerPC, on which the a.out binary format +has never been supported, and therefore the kernel +header does not exist. + +One solution would have been to use the header, but this one +is only available in glibc, and it also has a slightly different +definition than the one in . So, for the time being, the +easiest solution is to just replace the #include in Valgrind +code by a copy/paste of the 'struct nlist' definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/coregrind/m_debuginfo/readstabs.c +=================================================================== +--- a/coregrind/m_debuginfo/readstabs.c ++++ b/coregrind/m_debuginfo/readstabs.c +@@ -52,7 +52,21 @@ + + /* --- !!! --- EXTERNAL HEADERS start --- !!! --- */ + #if defined(VGO_linux) +-# include /* stabs defns */ ++/* Copied from a.out.h, because it is otherwise not available on ++ PowerPC/uClibc */ ++struct nlist ++{ ++ union ++ { ++ char *n_name; ++ struct nlist *n_next; ++ long n_strx; ++ } n_un; ++ unsigned char n_type; ++ char n_other; ++ short n_desc; ++ unsigned long n_value; ++}; + #elif defined(VGO_darwin) + # include + # define n_other n_sect