aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/valgrind
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2017-07-14 19:53:42 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-07-17 13:48:58 +0100
commitcd1a123bd07016abcff218d4274161cd794a190b (patch)
tree8717b27f4a9d91072f187dba307d9cad12c64753 /meta/recipes-devtools/valgrind
parent99e00dc094afbff7785263b760e26e03ac09425f (diff)
downloadopenembedded-core-contrib-cd1a123bd07016abcff218d4274161cd794a190b.tar.gz
valgrind: fix ptest compilation for PowerPC
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/valgrind')
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch87
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.13.0.bb1
2 files changed, 88 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch
new file mode 100644
index 0000000000..51259db001
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch
@@ -0,0 +1,87 @@
+Backport a patch from upstream to fix test compilation for PPC where
+system headers don't get included.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines
+
+ppc64 doesn't compile test_isa_2_06_partx.c without VSX support
+
+The #ifdef HAS_VSX guard is wrongly placed. It makes the standard
+include headers not be used. Causing a build failure. Fix by moving
+the #ifdef HAS_VSX after the standard includes.
+
+Index: none/tests/ppc32/test_isa_2_06_part3.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450)
+@@ -20,17 +20,18 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
+-#include <altivec.h>
+ #include <math.h>
+ #include <unistd.h> // getopt
+
++#ifdef HAS_VSX
++
++#include <altivec.h>
++
+ #ifndef __powerpc64__
+ typedef uint32_t HWord_t;
+ #else
+Index: none/tests/ppc32/test_isa_2_06_part1.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450)
+@@ -20,13 +20,14 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
++
++#ifdef HAS_VSX
++
+ #include <altivec.h>
+
+ #ifndef __powerpc64__
+Index: none/tests/ppc32/test_isa_2_06_part2.c
+===================================================================
+--- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449)
++++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450)
+@@ -20,17 +20,18 @@
+ The GNU General Public License is contained in the file COPYING.
+ */
+
+-#ifdef HAS_VSX
+-
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <malloc.h>
+-#include <altivec.h>
+ #include <math.h>
+ #include <unistd.h> // getopt
+
++#ifdef HAS_VSX
++
++#include <altivec.h>
++
+ #ifndef __powerpc64__
+ typedef uint32_t HWord_t;
+ #else
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
index 2ec9b9b6fc..feab5fc1a1 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.13.0.bb
@@ -36,6 +36,7 @@ SRC_URI = "ftp://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \
file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \
file://link-gz-tests.patch \
+ file://ppc-headers.patch \
"
SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369"
SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b"