* [Buildroot] [PATCH] valgrind: add patch to fix build on PowerPC uClibc
@ 2014-10-12 17:27 Thomas Petazzoni
2014-10-12 17:43 ` Peter Korsgaard
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2014-10-12 17:27 UTC (permalink / raw)
To: buildroot
uClibc on PowerPC forgot to define some PTRACE_* definitions. Even
though the Buildroot uClibc package has a fix for this, it doesn't fix
external uClibc toolchains that are not patched. Therefore this commit
adds a patch to Valgrind to workaround the problem by defining
PTRACE_GETSIGINFO to the appropriate value on PowerPC when it's not
defined by the C library.
Fixes:
http://autobuild.buildroot.org/results/bc6/bc6be9aa1ad39201a1045a65c0c3eb1e968371f2/
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
...-add-missing-ptrace-getsiginfo-on-powerpc.patch | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 package/valgrind/valgrind-0003-add-missing-ptrace-getsiginfo-on-powerpc.patch
diff --git a/package/valgrind/valgrind-0003-add-missing-ptrace-getsiginfo-on-powerpc.patch b/package/valgrind/valgrind-0003-add-missing-ptrace-getsiginfo-on-powerpc.patch
new file mode 100644
index 0000000..f663825
--- /dev/null
+++ b/package/valgrind/valgrind-0003-add-missing-ptrace-getsiginfo-on-powerpc.patch
@@ -0,0 +1,28 @@
+Define PTRACE_GETSIGINFO on PowerPC when not available
+
+uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even
+though Buildroot has a uClibc patch doing that, it doesn't solve the
+case of external uClibc toolchain from other sources (such as
+Crosstool-NG). Therefore, this patch modifies Valgrind to define
+PTRACE_GETSIGINFO on PowerPC to the right value, when such definition
+is not available from the C library.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/coregrind/vgdb-invoker-ptrace.c
+===================================================================
+--- a/coregrind/vgdb-invoker-ptrace.c
++++ b/coregrind/vgdb-invoker-ptrace.c
+@@ -71,6 +71,12 @@
+ # endif
+ #endif
+
++#if defined(__powerpc__)
++# ifndef PTRACE_GETSIGINFO
++# define PTRACE_GETSIGINFO 0x4202
++# endif
++#endif
++
+ #if VEX_HOST_WORDSIZE == 8
+ typedef Addr64 CORE_ADDR;
+ #elif VEX_HOST_WORDSIZE == 4
--
2.0.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] valgrind: add patch to fix build on PowerPC uClibc
2014-10-12 17:27 [Buildroot] [PATCH] valgrind: add patch to fix build on PowerPC uClibc Thomas Petazzoni
@ 2014-10-12 17:43 ` Peter Korsgaard
0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2014-10-12 17:43 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
> uClibc on PowerPC forgot to define some PTRACE_* definitions. Even
> though the Buildroot uClibc package has a fix for this, it doesn't fix
> external uClibc toolchains that are not patched. Therefore this commit
> adds a patch to Valgrind to workaround the problem by defining
> PTRACE_GETSIGINFO to the appropriate value on PowerPC when it's not
> defined by the C library.
> Fixes:
> http://autobuild.buildroot.org/results/bc6/bc6be9aa1ad39201a1045a65c0c3eb1e968371f2/
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-12 17:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-12 17:27 [Buildroot] [PATCH] valgrind: add patch to fix build on PowerPC uClibc Thomas Petazzoni
2014-10-12 17:43 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox