diff options
| author | Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | 2018-10-31 09:21:51 +0530 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-16 16:33:08 +0000 |
| commit | c7d80dc8d793c26d06d383422eb273aa96c0e19d (patch) | |
| tree | 04fdfb6ef3a5ba6df4f20d675a685b0c8ad626a1 | |
| parent | 8cc8988943e4c91d72db83865acdf67880e3bbb7 (diff) | |
| download | poky-c7d80dc8d793c26d06d383422eb273aa96c0e19d.tar.gz | |
valgrind: fix ptest compilation for PowerPC64
The fix is similar to what was done for PowerPC32.
It solves below error, while compiling for PowerPC64,
-- snip --
| ../../../../valgrind-3.13.0/none/tests/ppc64/test_isa_2_06_part2.c: In function 'usage':
| ../../../../valgrind-3.13.0/none/tests/ppc64/test_isa_2_06_part2.c:1778:3: warning: implicit declaration of function 'fprintf' [-Wimplicit-function-declaration]
| fprintf(stderr,
| ^~~~~~~
| ../../../../valgrind-3.13.0/none/tests/ppc64/test_isa_2_06_part2.c:1778:3: warning: incompatible implicit declaration of built-in function 'fprintf'
| ../../../../valgrind-3.13.0/none/tests/ppc64/test_isa_2_06_part2.c:1778:3: note: include '<stdio.h>' or provide a declaration of 'fprintf'
| ../../../../valgrind-3.13.0/none/tests/ppc64/test_isa_2_06_part2.c:1778:11: error: 'stderr' undeclared (first use in this function)
| fprintf(stderr,
| ^~~~~~
-- snip --
(From OE-Core rev: 9f82bb4bf3d0ded246eb252b3f9b4b618b22fc95)
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch index 51259db001..4b531b42ea 100644 --- a/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch +++ b/meta/recipes-devtools/valgrind/valgrind/ppc-headers.patch | |||
| @@ -12,6 +12,11 @@ The #ifdef HAS_VSX guard is wrongly placed. It makes the standard | |||
| 12 | include headers not be used. Causing a build failure. Fix by moving | 12 | include headers not be used. Causing a build failure. Fix by moving |
| 13 | the #ifdef HAS_VSX after the standard includes. | 13 | the #ifdef HAS_VSX after the standard includes. |
| 14 | 14 | ||
| 15 | [v2 changes] | ||
| 16 | - Add #ifdef HAS_VSX guard correctly for ppc64 test_isa_2_06_partx.c | ||
| 17 | test cases. The changes are similar to what was done for ppc32. | ||
| 18 | |||
| 19 | Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> | ||
| 15 | Index: none/tests/ppc32/test_isa_2_06_part3.c | 20 | Index: none/tests/ppc32/test_isa_2_06_part3.c |
| 16 | =================================================================== | 21 | =================================================================== |
| 17 | --- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449) | 22 | --- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449) |
| @@ -85,3 +90,76 @@ Index: none/tests/ppc32/test_isa_2_06_part2.c | |||
| 85 | #ifndef __powerpc64__ | 90 | #ifndef __powerpc64__ |
| 86 | typedef uint32_t HWord_t; | 91 | typedef uint32_t HWord_t; |
| 87 | #else | 92 | #else |
| 93 | Index: none/tests/ppc64/test_isa_2_06_part3.c | ||
| 94 | =================================================================== | ||
| 95 | --- a/none/tests/ppc64/test_isa_2_06_part3.c (revision 16449) | ||
| 96 | +++ b/none/tests/ppc64/test_isa_2_06_part3.c (revision 16450) | ||
| 97 | @@ -20,17 +20,18 @@ | ||
| 98 | The GNU General Public License is contained in the file COPYING. | ||
| 99 | */ | ||
| 100 | |||
| 101 | -#ifdef HAS_VSX | ||
| 102 | - | ||
| 103 | #include <stdio.h> | ||
| 104 | #include <stdint.h> | ||
| 105 | #include <stdlib.h> | ||
| 106 | #include <string.h> | ||
| 107 | #include <malloc.h> | ||
| 108 | -#include <altivec.h> | ||
| 109 | #include <math.h> | ||
| 110 | #include <unistd.h> // getopt | ||
| 111 | |||
| 112 | +#ifdef HAS_VSX | ||
| 113 | + | ||
| 114 | +#include <altivec.h> | ||
| 115 | + | ||
| 116 | #ifndef __powerpc64__ | ||
| 117 | typedef uint32_t HWord_t; | ||
| 118 | #else | ||
| 119 | Index: none/tests/ppc64/test_isa_2_06_part1.c | ||
| 120 | =================================================================== | ||
| 121 | --- a/none/tests/ppc64/test_isa_2_06_part1.c (revision 16449) | ||
| 122 | +++ b/none/tests/ppc64/test_isa_2_06_part1.c (revision 16450) | ||
| 123 | @@ -20,13 +20,14 @@ | ||
| 124 | The GNU General Public License is contained in the file COPYING. | ||
| 125 | */ | ||
| 126 | |||
| 127 | -#ifdef HAS_VSX | ||
| 128 | - | ||
| 129 | #include <stdio.h> | ||
| 130 | #include <stdint.h> | ||
| 131 | #include <stdlib.h> | ||
| 132 | #include <string.h> | ||
| 133 | #include <malloc.h> | ||
| 134 | + | ||
| 135 | +#ifdef HAS_VSX | ||
| 136 | + | ||
| 137 | #include <altivec.h> | ||
| 138 | |||
| 139 | #ifndef __powerpc64__ | ||
| 140 | Index: none/tests/ppc64/test_isa_2_06_part2.c | ||
| 141 | =================================================================== | ||
| 142 | --- a/none/tests/ppc64/test_isa_2_06_part2.c (revision 16449) | ||
| 143 | +++ b/none/tests/ppc64/test_isa_2_06_part2.c (revision 16450) | ||
| 144 | @@ -20,17 +20,18 @@ | ||
| 145 | The GNU General Public License is contained in the file COPYING. | ||
| 146 | */ | ||
| 147 | |||
| 148 | -#ifdef HAS_VSX | ||
| 149 | - | ||
| 150 | #include <stdio.h> | ||
| 151 | #include <stdint.h> | ||
| 152 | #include <stdlib.h> | ||
| 153 | #include <string.h> | ||
| 154 | #include <malloc.h> | ||
| 155 | -#include <altivec.h> | ||
| 156 | #include <math.h> | ||
| 157 | #include <unistd.h> // getopt | ||
| 158 | |||
| 159 | +#ifdef HAS_VSX | ||
| 160 | + | ||
| 161 | +#include <altivec.h> | ||
| 162 | + | ||
| 163 | #ifndef __powerpc64__ | ||
| 164 | typedef uint32_t HWord_t; | ||
| 165 | #else | ||
