Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | Backport a patch from upstream to fix test compilation for PPC where |
| 2 | system headers don't get included. |
| 3 | |
| 4 | Upstream-Status: Backport |
| 5 | Signed-off-by: Ross Burton <ross.burton@intel.com> |
| 6 | |
| 7 | r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines |
| 8 | |
| 9 | ppc64 doesn't compile test_isa_2_06_partx.c without VSX support |
| 10 | |
| 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 |
| 13 | the #ifdef HAS_VSX after the standard includes. |
| 14 | |
Brad Bishop | 6f8dcde | 2018-10-16 10:47:12 +0800 | [diff] [blame] | 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> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | Index: none/tests/ppc32/test_isa_2_06_part3.c |
| 21 | =================================================================== |
| 22 | --- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449) |
| 23 | +++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450) |
| 24 | @@ -20,17 +20,18 @@ |
| 25 | The GNU General Public License is contained in the file COPYING. |
| 26 | */ |
| 27 | |
| 28 | -#ifdef HAS_VSX |
| 29 | - |
| 30 | #include <stdio.h> |
| 31 | #include <stdint.h> |
| 32 | #include <stdlib.h> |
| 33 | #include <string.h> |
| 34 | #include <malloc.h> |
| 35 | -#include <altivec.h> |
| 36 | #include <math.h> |
| 37 | #include <unistd.h> // getopt |
| 38 | |
| 39 | +#ifdef HAS_VSX |
| 40 | + |
| 41 | +#include <altivec.h> |
| 42 | + |
| 43 | #ifndef __powerpc64__ |
| 44 | typedef uint32_t HWord_t; |
| 45 | #else |
| 46 | Index: none/tests/ppc32/test_isa_2_06_part1.c |
| 47 | =================================================================== |
| 48 | --- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449) |
| 49 | +++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450) |
| 50 | @@ -20,13 +20,14 @@ |
| 51 | The GNU General Public License is contained in the file COPYING. |
| 52 | */ |
| 53 | |
| 54 | -#ifdef HAS_VSX |
| 55 | - |
| 56 | #include <stdio.h> |
| 57 | #include <stdint.h> |
| 58 | #include <stdlib.h> |
| 59 | #include <string.h> |
| 60 | #include <malloc.h> |
| 61 | + |
| 62 | +#ifdef HAS_VSX |
| 63 | + |
| 64 | #include <altivec.h> |
| 65 | |
| 66 | #ifndef __powerpc64__ |
| 67 | Index: none/tests/ppc32/test_isa_2_06_part2.c |
| 68 | =================================================================== |
| 69 | --- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449) |
| 70 | +++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450) |
| 71 | @@ -20,17 +20,18 @@ |
| 72 | The GNU General Public License is contained in the file COPYING. |
| 73 | */ |
| 74 | |
| 75 | -#ifdef HAS_VSX |
| 76 | - |
| 77 | #include <stdio.h> |
| 78 | #include <stdint.h> |
| 79 | #include <stdlib.h> |
| 80 | #include <string.h> |
| 81 | #include <malloc.h> |
| 82 | -#include <altivec.h> |
| 83 | #include <math.h> |
| 84 | #include <unistd.h> // getopt |
| 85 | |
| 86 | +#ifdef HAS_VSX |
| 87 | + |
| 88 | +#include <altivec.h> |
| 89 | + |
| 90 | #ifndef __powerpc64__ |
| 91 | typedef uint32_t HWord_t; |
| 92 | #else |
Brad Bishop | 6f8dcde | 2018-10-16 10:47:12 +0800 | [diff] [blame] | 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 |