All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] valgrind - gcc7 and powerpc64
@ 2017-07-14  0:24 Joe Slater
  2017-07-14  0:24 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Joe Slater
  2017-07-14  0:31 ` ✗ patchtest: failure for valgrind - gcc7 and powerpc64 Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Joe Slater @ 2017-07-14  0:24 UTC (permalink / raw)
  To: openembedded-core

This probably could do no harm since the actual code generated does not
seem to have changed between gcc6 and gcc7, and is not affected by this patch
except that without it, valgrind ppc64 won't compile.

There must also be a gcc7 bug, since if it is ok to clobber r2 for ppc32 it
is unlikely it is not ok for ppc64.

Joe Slater (1):
  valgrind: allow version 3.12 to build under gcc7

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

-- 
2.7.4



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

* [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7
  2017-07-14  0:24 [PATCH 0/1] valgrind - gcc7 and powerpc64 Joe Slater
@ 2017-07-14  0:24 ` Joe Slater
  2017-07-14  1:40   ` Khem Raj
  2017-07-14  8:42   ` Sören Brinkmann
  2017-07-14  0:31 ` ✗ patchtest: failure for valgrind - gcc7 and powerpc64 Patchwork
  1 sibling, 2 replies; 5+ messages in thread
From: Joe Slater @ 2017-07-14  0:24 UTC (permalink / raw)
  To: openembedded-core

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



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

* ✗ patchtest: failure for valgrind - gcc7 and powerpc64
  2017-07-14  0:24 [PATCH 0/1] valgrind - gcc7 and powerpc64 Joe Slater
  2017-07-14  0:24 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Joe Slater
@ 2017-07-14  0:31 ` Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-07-14  0:31 UTC (permalink / raw)
  To: Joe Slater; +Cc: openembedded-core

== Series Details ==

Series: valgrind - gcc7 and powerpc64
Revision: 1
URL   : https://patchwork.openembedded.org/series/7738/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Upstream-Status is in incorrect format [test_upstream_status_format] 
  Suggested fix    Fix Upstream-Status format in meta/recipes-devtools/valgrind/valgrind/wait-for-3.13.patch so it is one of: Pending, Submitted, Accepted, Backport, Denied, Inappropriate

* Issue             Series does not apply on top of target branch [test_series_merge_on_head] 
  Suggested fix    Rebase your series on top of targeted branch
  Targeted branch  master (currently at b1c4661742)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



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

* Re: [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7
  2017-07-14  0:24 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Joe Slater
@ 2017-07-14  1:40   ` Khem Raj
  2017-07-14  8:42   ` Sören Brinkmann
  1 sibling, 0 replies; 5+ messages in thread
From: Khem Raj @ 2017-07-14  1:40 UTC (permalink / raw)
  To: Joe Slater; +Cc: Patches and discussions about the oe-core layer

On Thu, Jul 13, 2017 at 5:24 PM, Joe Slater <jslater@windriver.com> wrote:
> Building for powerpc64 fails because of erroneous assertions
> that register r2 is clobbered.  This has probably been fixed
> in version 3.13.
>

there were patches for 3.13 posted.
lets make that work for you.

> 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
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7
  2017-07-14  0:24 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Joe Slater
  2017-07-14  1:40   ` Khem Raj
@ 2017-07-14  8:42   ` Sören Brinkmann
  1 sibling, 0 replies; 5+ messages in thread
From: Sören Brinkmann @ 2017-07-14  8:42 UTC (permalink / raw)
  To: Joe Slater; +Cc: openembedded-core

On Thu, 2017-07-13 at 17:24:21 -0700, Joe Slater wrote:
> Building for powerpc64 fails because of erroneous assertions
> that register r2 is clobbered.  This has probably been fixed
> in version 3.13.

Wouldn't it make more sense then to go ahead with the 3.13 update
instead of adding another out-of-tree workaround? That patch is already
on the list: https://patchwork.openembedded.org/series/7639/

	Sören


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

end of thread, other threads:[~2017-07-14  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-14  0:24 [PATCH 0/1] valgrind - gcc7 and powerpc64 Joe Slater
2017-07-14  0:24 ` [PATCH 1/1] valgrind: allow version 3.12 to build under gcc7 Joe Slater
2017-07-14  1:40   ` Khem Raj
2017-07-14  8:42   ` Sören Brinkmann
2017-07-14  0:31 ` ✗ patchtest: failure for valgrind - gcc7 and powerpc64 Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.