[OE-core] [oe-core][PATCH 1/1][V2] valgrind: allow version 3.12 to build under gcc7
Joe Slater
jslater at windriver.com
Fri Jul 14 20:02:13 UTC 2017
Building for powerpc64 fails because of erroneous assertions
that register r2 is clobbered. This has been fixed in
version 3.13.
Signed-off-by: Joe Slater <jslater at windriver.com>
---
.../valgrind/valgrind/wait-for-3.13.patch | 40 ++++++++++++++++++++++
meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 1 +
2 files changed, 41 insertions(+)
create mode 100644 meta/recipes-devtools/valgrind/valgrind/wait-for-3.13.patch
diff --git a/meta/recipes-devtools/valgrind/valgrind/wait-for-3.13.patch b/meta/recipes-devtools/valgrind/valgrind/wait-for-3.13.patch
new file mode 100644
index 0000000..355c336
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/wait-for-3.13.patch
@@ -0,0 +1,40 @@
+valgrind: allow compilation under gcc7 for powerpc64
+
+Remove a few admonitions that r2 is not preserved by function or system calls
+since they are not true. -m32 ppc code does not care, but -m64 code does.
+
+Upstream-Status: Accepted [ version 3.13 has similar changes, but NOT this patch ]
+
+Signed-off-by: Joe Slater <joe.slater at windriver.com>
+
+--- a/coregrind/m_debuglog.c
++++ b/coregrind/m_debuglog.c
+@@ -215,7 +215,7 @@ static UInt local_sys_write_stderr ( con
+ :
+ : "b" (block)
+ : "cc","memory","cr0","ctr",
+- "r0","r2","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
++ "r0","r3","r4","r5","r6","r7","r8","r9","r10","r11","r12"
+ );
+ if (block[0] < 0)
+ block[0] = -1;
+@@ -231,7 +231,7 @@ static UInt local_sys_getpid ( void )
+ : "=&r" (__res)
+ : "i" (__NR_getpid)
+ : "cc","memory","cr0","ctr",
+- "r0","r2","r4","r5","r6","r7","r8","r9","r10","r11","r12"
++ "r0","r4","r5","r6","r7","r8","r9","r10","r11","r12"
+ );
+ return (UInt)__res;
+ }
+--- a/include/valgrind.h
++++ b/include/valgrind.h
+@@ -2708,7 +2708,7 @@ typedef
+ #define __CALLER_SAVED_REGS \
+ "lr", "ctr", "xer", \
+ "cr0", "cr1", "cr2", "cr3", "cr4", "cr5", "cr6", "cr7", \
+- "r0", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
++ "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10", \
+ "r11", "r12", "r13"
+
+ /* Macros to save and align the stack before making a function
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
index b63d278..80b1781 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -35,6 +35,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \
file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
+ file://wait-for-3.13.patch \
"
SRC_URI_append_libc-musl = "\
file://0001-fix-build-for-musl-targets.patch \
--
2.7.4
More information about the Openembedded-core
mailing list