summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/no-sse-fix-test-case-failures.patch259
2 files changed, 260 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc
index 724f9c32a0..da236e50c0 100644
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -74,6 +74,7 @@ SRC_URI = "\
74 file://0048-gcc-Enable-static-PIE.patch \ 74 file://0048-gcc-Enable-static-PIE.patch \
75 file://fix-segmentation-fault-precompiled-hdr.patch \ 75 file://fix-segmentation-fault-precompiled-hdr.patch \
76 file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \ 76 file://0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch \
77 file://no-sse-fix-test-case-failures.patch \
77 ${BACKPORTS} \ 78 ${BACKPORTS} \
78" 79"
79BACKPORTS = "\ 80BACKPORTS = "\
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/no-sse-fix-test-case-failures.patch b/meta/recipes-devtools/gcc/gcc-7.3/no-sse-fix-test-case-failures.patch
new file mode 100644
index 0000000000..cb87c5ab7e
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/no-sse-fix-test-case-failures.patch
@@ -0,0 +1,259 @@
1From f22830da2ba64577deb6f717d05d86c03dd2e50d Mon Sep 17 00:00:00 2001
2From: RAGHUNATH LOLUR <raghunath.lolur@kpit.com>
3Date: Wed, 6 Dec 2017 22:52:26 -0800
4Subject: [PATCH] Fix for testsuite failure
5
62017-11-16 Raghunath Lolur <raghunath.lolur@kpit.com>
7
8 * gcc.dg/pr56275.c: If SSE is disabled, ensure that
9 "-mfpmath" is not set to use SSE. Set "-mfpmath=387".
10 * gcc.dg/pr68306.c: Likewise
11 * gcc.dg/pr68306-2.c: Likewise
12 * gcc.dg/pr68306-3.c: Likewise
13 * gcc.dg/pr69634.c: Likewise
14 * gcc.target/i386/amd64-abi-1.c: Likewise
15 * gcc.target/i386/funcspec-6.c: Likewise
16 * gcc.target/i386/interrupt-387-err-1.c: Likewise
17 * gcc.target/i386/isa-14.c: Likewise
18 * gcc.target/i386/pr44948-2b.c: Likewise
19 * gcc.target/i386/pr53425-1.c: Likewise
20 * gcc.target/i386/pr53425-2.c: Likewise
21 * gcc.target/i386/pr55247.c: Likewise
22 * gcc.target/i386/pr59644.c: Likewise
23 * gcc.target/i386/pr62120.c: Likewise
24 * gcc.target/i386/pr70467-1.c: Likewise
25 * gcc.target/i386/warn-vect-op-1.c: Likewise
26
27If -Wall, -Werror are used during compilation various test cases fail
28to compile.
29
30If SSE is disabled, be sure to -mfpmath=387 to resolve this.
31
32This patch removes the changes to Changelog from the original patch.
33This will help us avoid conflicts.
34
35Upstream-Status: Pending
36
37Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
38---
39 gcc/testsuite/ChangeLog | 21 +++++++++++++++++++++
40 gcc/testsuite/gcc.dg/pr56275.c | 2 +-
41 gcc/testsuite/gcc.dg/pr68306-2.c | 2 +-
42 gcc/testsuite/gcc.dg/pr68306-3.c | 2 +-
43 gcc/testsuite/gcc.dg/pr68306.c | 2 +-
44 gcc/testsuite/gcc.dg/pr69634.c | 2 +-
45 .../gcc/testsuite/gcc.target/i386/amd64-abi-1.c | 2 +-
46 .../gcc/testsuite/gcc.target/i386/funcspec-6.c | 1 +
47 .../testsuite/gcc.target/i386/interrupt-387-err-1.c | 2 +-
48 gcc/testsuite/gcc.target/i386/isa-14.c | 2 +-
49 .../gcc/testsuite/gcc.target/i386/pr44948-2b.c | 2 +-
50 gcc/testsuite/gcc.target/i386/pr53425-1.c | 2 +-
51 gcc/testsuite/gcc.target/i386/pr53425-2.c | 2 +-
52 gcc/testsuite/gcc.target/i386/pr55247.c | 2 +-
53 gcc/testsuite/gcc.target/i386/pr59644.c | 2 +-
54 gcc/testsuite/gcc.target/i386/pr62120.c | 2 +-
55 gcc/testsuite/gcc.target/i386/pr70467-1.c | 2 +-
56 .../gcc/testsuite/gcc.target/i386/warn-vect-op-1.c | 2 +-
57 18 files changed, 38 insertions(+), 16 deletions(-)
58
59diff --git a/gcc/testsuite/gcc.dg/pr56275.c b/gcc/testsuite/gcc.dg/pr56275.c
60index b901bb2..a4f6c95 100644
61--- a/gcc/testsuite/gcc.dg/pr56275.c
62+++ b/gcc/testsuite/gcc.dg/pr56275.c
63@@ -1,6 +1,6 @@
64 /* { dg-do compile } */
65 /* { dg-options "-O2" } */
66-/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
67+/* { dg-additional-options "-mno-sse -mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
68
69 typedef long long v2tw __attribute__ ((vector_size (2 * sizeof (long long))));
70
71diff --git a/gcc/testsuite/gcc.dg/pr68306-2.c b/gcc/testsuite/gcc.dg/pr68306-2.c
72index 4672ebe..2a368c4 100644
73--- a/gcc/testsuite/gcc.dg/pr68306-2.c
74+++ b/gcc/testsuite/gcc.dg/pr68306-2.c
75@@ -1,6 +1,6 @@
76 /* { dg-do compile } */
77 /* { dg-options "-O3" } */
78-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
79+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
80
81 struct {
82 int tz_minuteswest;
83diff --git a/gcc/testsuite/gcc.dg/pr68306-3.c b/gcc/testsuite/gcc.dg/pr68306-3.c
84index f5a8c10..df3390c 100644
85--- a/gcc/testsuite/gcc.dg/pr68306-3.c
86+++ b/gcc/testsuite/gcc.dg/pr68306-3.c
87@@ -1,6 +1,6 @@
88 /* { dg-do compile } */
89 /* { dg-options "-O3" } */
90-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
91+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
92 /* { dg-additional-options "-mno-altivec -mno-vsx" { target powerpc*-*-* } } */
93
94 extern void fn2();
95diff --git a/gcc/testsuite/gcc.dg/pr68306.c b/gcc/testsuite/gcc.dg/pr68306.c
96index 54e5b40..0813389 100644
97--- a/gcc/testsuite/gcc.dg/pr68306.c
98+++ b/gcc/testsuite/gcc.dg/pr68306.c
99@@ -1,6 +1,6 @@
100 /* { dg-do compile } */
101 /* { dg-options "-O3" } */
102-/* { dg-additional-options "-mno-sse -mno-mmx" { target i?86-*-* x86_64-*-* } } */
103+/* { dg-additional-options "-mno-sse -mno-mmx -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
104
105 enum powerpc_pmc_type { PPC_PMC_IBM };
106 struct {
107diff --git a/gcc/testsuite/gcc.dg/pr69634.c b/gcc/testsuite/gcc.dg/pr69634.c
108index 60a5614..bcc23f9 100644
109--- a/gcc/testsuite/gcc.dg/pr69634.c
110+++ b/gcc/testsuite/gcc.dg/pr69634.c
111@@ -1,6 +1,6 @@
112 /* { dg-do compile } */
113 /* { dg-options "-O2 -fno-dce -fschedule-insns -fno-tree-vrp -fcompare-debug -Wno-psabi" } */
114-/* { dg-additional-options "-mno-sse" { target i?86-*-* x86_64-*-* } } */
115+/* { dg-additional-options "-mno-sse -mfpmath=387" { target i?86-*-* x86_64-*-* } } */
116 /* { dg-require-effective-target scheduling } */
117
118 typedef unsigned short u16;
119diff --git a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
120index 69fde57..7f1f1c0 100644
121--- a/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
122+++ b/gcc/testsuite/gcc.target/i386/amd64-abi-1.c
123@@ -1,5 +1,5 @@
124 /* { dg-do compile { target { ! ia32 } } } */
125-/* { dg-options "-mno-sse" } */
126+/* { dg-options "-mno-sse -mfpmath=387" } */
127 /* { dg-additional-options "-mabi=sysv" { target *-*-mingw* } } */
128
129 double foo(void) { return 0; } /* { dg-error "SSE disabled" } */
130diff --git a/gcc/testsuite/gcc.target/i386/funcspec-6.c b/gcc/testsuite/gcc.target/i386/funcspec-6.c
131index ea896b7..bf15569 100644
132--- a/gcc/testsuite/gcc.target/i386/funcspec-6.c
133+++ b/gcc/testsuite/gcc.target/i386/funcspec-6.c
134@@ -1,6 +1,7 @@
135 /* Test whether all of the 64-bit function specific options are accepted
136 without error. */
137 /* { dg-do compile { target { ! ia32 } } } */
138+/* { dg-additional-options "-mfpmath=387" } */
139
140 #include "funcspec-56.inc"
141
142diff --git a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
143index 3fbdc88..6b4d9d1 100644
144--- a/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
145+++ b/gcc/testsuite/gcc.target/i386/interrupt-387-err-1.c
146@@ -1,5 +1,5 @@
147 /* { dg-do compile } */
148-/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387" } */
149+/* { dg-options "-O2 -mgeneral-regs-only -mno-cld -mno-iamcu -m80387 -mfpmath=387" } */
150
151 typedef unsigned int uword_t __attribute__ ((mode (__word__)));
152
153diff --git a/gcc/testsuite/gcc.target/i386/isa-14.c b/gcc/testsuite/gcc.target/i386/isa-14.c
154index 5d49e6e..1de2db9 100644
155--- a/gcc/testsuite/gcc.target/i386/isa-14.c
156+++ b/gcc/testsuite/gcc.target/i386/isa-14.c
157@@ -1,5 +1,5 @@
158 /* { dg-do run } */
159-/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse" } */
160+/* { dg-options "-march=x86-64 -msse4a -mfma4 -mno-sse -mfpmath=387" } */
161
162 extern void abort (void);
163
164diff --git a/gcc/testsuite/gcc.target/i386/pr44948-2b.c b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
165index fa1769b..f79fb12 100644
166--- a/gcc/testsuite/gcc.target/i386/pr44948-2b.c
167+++ b/gcc/testsuite/gcc.target/i386/pr44948-2b.c
168@@ -1,5 +1,5 @@
169 /* { dg-do compile } */
170-/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic" } */
171+/* { dg-options "-O -mno-sse -Wno-psabi -mtune=generic -mfpmath=387" } */
172
173 struct A
174 {
175diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c
176index 2e89ff7..6339bf6 100644
177--- a/gcc/testsuite/gcc.target/i386/pr53425-1.c
178+++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c
179@@ -1,6 +1,6 @@
180 /* PR target/53425 */
181 /* { dg-do compile { target { ! ia32 } } } */
182-/* { dg-options "-O2 -mno-sse" } */
183+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
184 /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
185
186 typedef double __v2df __attribute__ ((__vector_size__ (16)));
187diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c
188index 61f6283..2c5a55f 100644
189--- a/gcc/testsuite/gcc.target/i386/pr53425-2.c
190+++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c
191@@ -1,6 +1,6 @@
192 /* PR target/53425 */
193 /* { dg-do compile { target { ! ia32 } } } */
194-/* { dg-options "-O2 -mno-sse" } */
195+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
196 /* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
197
198 typedef float __v2sf __attribute__ ((__vector_size__ (8)));
199diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c
200index 23366d0..9810e3a 100644
201--- a/gcc/testsuite/gcc.target/i386/pr55247.c
202+++ b/gcc/testsuite/gcc.target/i386/pr55247.c
203@@ -1,6 +1,6 @@
204 /* { dg-do compile { target { ! ia32 } } } */
205 /* { dg-require-effective-target maybe_x32 } */
206-/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */
207+/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long -mfpmath=387" } */
208
209 typedef unsigned int uint32_t;
210 typedef uint32_t Elf32_Word;
211diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c
212index 96006b3..4287e45 100644
213--- a/gcc/testsuite/gcc.target/i386/pr59644.c
214+++ b/gcc/testsuite/gcc.target/i386/pr59644.c
215@@ -1,6 +1,6 @@
216 /* PR target/59644 */
217 /* { dg-do run { target lp64 } } */
218-/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */
219+/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone -mfpmath=387" } */
220
221 /* This test uses __builtin_trap () instead of e.g. abort,
222 because due to -mpreferred-stack-boundary=3 it should not call
223diff --git a/gcc/testsuite/gcc.target/i386/pr62120.c b/gcc/testsuite/gcc.target/i386/pr62120.c
224index bfb8c47..ed04cf1 100644
225--- a/gcc/testsuite/gcc.target/i386/pr62120.c
226+++ b/gcc/testsuite/gcc.target/i386/pr62120.c
227@@ -1,5 +1,5 @@
228 /* { dg-do compile } */
229-/* { dg-options "-mno-sse" } */
230+/* { dg-options "-mno-sse -mfpmath=387" } */
231
232 void foo ()
233 {
234diff --git a/gcc/testsuite/gcc.target/i386/pr70467-1.c b/gcc/testsuite/gcc.target/i386/pr70467-1.c
235index 4e112c8..bcfb396 100644
236--- a/gcc/testsuite/gcc.target/i386/pr70467-1.c
237+++ b/gcc/testsuite/gcc.target/i386/pr70467-1.c
238@@ -1,6 +1,6 @@
239 /* PR rtl-optimization/70467 */
240 /* { dg-do compile } */
241-/* { dg-options "-O2 -mno-sse" } */
242+/* { dg-options "-O2 -mno-sse -mfpmath=387" } */
243
244 void foo (unsigned long long *);
245
246diff --git a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
247index 6cda153..26e37f5 100644
248--- a/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
249+++ b/gcc/testsuite/gcc.target/i386/warn-vect-op-1.c
250@@ -1,5 +1,5 @@
251 /* { dg-do compile { target { ! ia32 } } } */
252-/* { dg-options "-mno-sse -Wvector-operation-performance" } */
253+/* { dg-options "-mno-sse -Wvector-operation-performance -mfpmath=387" } */
254 #define vector(elcount, type) \
255 __attribute__((vector_size((elcount)*sizeof(type)))) type
256
257--
2581.8.5.6
259