Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [pull request] Pull request for branch for-2012.05/valgrind-fix
@ 2012-05-06  9:39 Thomas Petazzoni
  2012-05-06  9:39 ` [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2012-05-06  9:39 UTC (permalink / raw)
  To: buildroot

The following changes since commit a4ee7179e692bdded8b98c54dd484b17098c695d:

  Added the empty package (2012-05-06 10:01:35 +0200)

are available in the git repository at:

  git://git.free-electrons.com/users/thomas-petazzoni/buildroot.git for-2012.05/valgrind-fix

for you to fetch changes up to 92316b7267b614887d3186bcb585dc39206b0a85:

  valgrind: fix build on PowerPC/uClibc (2012-05-06 11:38:30 +0200)

----------------------------------------------------------------
Thomas Petazzoni (1):
      valgrind: fix build on PowerPC/uClibc

 .../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

Thanks,
-- 
Thomas Petazzoni

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc
  2012-05-06  9:39 [Buildroot] [pull request] Pull request for branch for-2012.05/valgrind-fix Thomas Petazzoni
@ 2012-05-06  9:39 ` Thomas Petazzoni
  2012-05-06  9:49   ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2012-05-06  9:39 UTC (permalink / raw)
  To: buildroot

Fixes build failures like
http://autobuild.buildroot.org/results/112fa7c56e1e31c9a81d5f27394f58789e36bfec/build-end.log.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../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 <a.out.h>
+
+Valgrind includes <a.out.h> to get the definition of 'struct
+nlist'. However, while glibc directly defines 'struct nlist' in
+<a.out.h>, uClibc relies on it being defined by kernel headers (i.e
+<a.out.h> simply includes <linux/a.out.h>). This works for most
+architectures, but not for PowerPC, on which the a.out binary format
+has never been supported, and therefore the <linux/a.out.h> kernel
+header does not exist.
+
+One solution would have been to use the <nlist.h> header, but this one
+is only available in glibc, and it also has a slightly different
+definition than the one in <a.out.h>. So, for the time being, the
+easiest solution is to just replace the #include <a.out.h> in Valgrind
+code by a copy/paste of the 'struct nlist' definition.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+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 <a.out.h> /* 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 <mach-o/nlist.h>
+ #  define n_other n_sect
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc
  2012-05-06  9:39 ` [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc Thomas Petazzoni
@ 2012-05-06  9:49   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-05-06  9:49 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 Thomas> Fixes build failures like
 Thomas> http://autobuild.buildroot.org/results/112fa7c56e1e31c9a81d5f27394f58789e36bfec/build-end.log.

Great, committed - Thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-06  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-06  9:39 [Buildroot] [pull request] Pull request for branch for-2012.05/valgrind-fix Thomas Petazzoni
2012-05-06  9:39 ` [Buildroot] [PATCH 1/1] valgrind: fix build on PowerPC/uClibc Thomas Petazzoni
2012-05-06  9:49   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox