From: Joe Slater <jslater@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7
Date: Thu, 13 Jul 2017 17:24:21 -0700 [thread overview]
Message-ID: <1499991861-19044-2-git-send-email-jslater@windriver.com> (raw)
In-Reply-To: <1499991861-19044-1-git-send-email-jslater@windriver.com>
Building for powerpc64 fails because of erroneous assertions
that register r2 is clobbered. This has probably been fixed
in version 3.13.
Signed-off-by: Joe Slater <jslater@windriver.com>
---
.../valgrind/valgrind/wait-for-3.13.patch | 40 ++++++++++++++++++++++
meta/recipes-devtools/valgrind/valgrind_3.12.0.bb | 3 ++
2 files changed, 43 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..efab1d3
--- /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: not-applicable [ version 3.13 has similar changes, but this is NOT a backport ]
+
+Signed-off-by: Joe Slater <joe.slater@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 00135d8..8b0bc35 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.12.0.bb
@@ -31,6 +31,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \
file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \
file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \
+ file://wait-for-3.13.patch \
"
SRC_URI_append_libc-musl = "\
file://0001-fix-build-for-musl-targets.patch \
@@ -40,6 +41,8 @@ SRC_URI[sha256sum] = "67ca4395b2527247780f36148b084f5743a68ab0c850cb43e4a5b4b012
COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux'
+#COMPATIBLE_HOST_powerpc64 = 'null'
+
# valgrind supports armv7 and above
COMPATIBLE_HOST_armv4 = 'null'
COMPATIBLE_HOST_armv5 = 'null'
--
2.7.4
next prev parent reply other threads:[~2017-07-14 0:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 0:24 [PATCH 0/1] valgrind - gcc7 and powerpc64 Joe Slater
2017-07-14 0:24 ` Joe Slater [this message]
2017-07-14 1:40 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Khem Raj
2017-07-14 8:42 ` Sören Brinkmann
2017-07-14 0:31 ` ✗ patchtest: failure for valgrind - gcc7 and powerpc64 Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1499991861-19044-2-git-send-email-jslater@windriver.com \
--to=jslater@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox