summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch138
1 files changed, 66 insertions, 72 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch b/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
index e4d57c27ef..0a61862332 100644
--- a/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
+++ b/meta/recipes-devtools/gcc/gcc/0025-gcc-testsuite-tweaks-for-mips-OE.patch
@@ -1,6 +1,6 @@
1From f12acc6a383546d48da3bdfb2f25ca2adb7976d7 Mon Sep 17 00:00:00 2001 1From 62e25edd60d45eaec331a3273880f6ff3248ef62 Mon Sep 17 00:00:00 2001
2From: Richard Purdie <richard.purdie@linuxfoundation.org> 2From: Richard Purdie <richard.purdie@linuxfoundation.org>
3Date: Sun, 13 Aug 2023 10:24:05 +0100 3Date: Thu, 17 Aug 2023 09:01:40 -0700
4Subject: [PATCH] gcc testsuite tweaks for mips/OE 4Subject: [PATCH] gcc testsuite tweaks for mips/OE
5 5
6Disable loongson-mmi runtine, qemu doesn't appear to fully support them even if some 6Disable loongson-mmi runtine, qemu doesn't appear to fully support them even if some
@@ -26,21 +26,23 @@ Also, for gcc.target tests, add checks on wheter loongson or msa code can
26be run before trying that, allowing downgrading of tests there to work too. 26be run before trying that, allowing downgrading of tests there to work too.
27 27
28Upstream-Status: Pending 28Upstream-Status: Pending
29
29[Parts of the patch may be able to be split off and acceptable to upstream with 30[Parts of the patch may be able to be split off and acceptable to upstream with
30discussion. Need to investigate why qemu-user passes the 'bad' instructions'] 31discussion. Need to investigate why qemu-user passes the 'bad' instructions']
31 32
32Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 33Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34Signed-off-by: Khem Raj <raj.khem@gmail.com>
33--- 35---
34 gcc/testsuite/gcc.target/mips/mips.exp | 16 +++++++++ 36 gcc/testsuite/gcc.target/mips/mips.exp | 16 ++++++++++
35 gcc/testsuite/lib/gcc-dg.exp | 11 +++++++ 37 gcc/testsuite/lib/gcc-dg.exp | 11 +++++++
36 gcc/testsuite/lib/target-supports.exp | 45 ++++++++------------------ 38 gcc/testsuite/lib/target-supports.exp | 44 ++++++++------------------
37 3 files changed, 41 insertions(+), 31 deletions(-) 39 3 files changed, 40 insertions(+), 31 deletions(-)
38 40
39diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp 41diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
40index 15d574202d3..2cef9709774 100644 42index 82d418a7cd4..46f7bf4ef92 100644
41--- a/gcc/testsuite/gcc.target/mips/mips.exp 43--- a/gcc/testsuite/gcc.target/mips/mips.exp
42+++ b/gcc/testsuite/gcc.target/mips/mips.exp 44+++ b/gcc/testsuite/gcc.target/mips/mips.exp
43@@ -709,7 +709,23 @@ proc mips_first_unsupported_option { upstatus } { 45@@ -711,7 +711,23 @@ proc mips_first_unsupported_option { upstatus } {
44 global mips_option_tests 46 global mips_option_tests
45 upvar $upstatus status 47 upvar $upstatus status
46 48
@@ -65,10 +67,10 @@ index 15d574202d3..2cef9709774 100644
65 regsub -all "\n" $code "\\n\\\n" asm 67 regsub -all "\n" $code "\\n\\\n" asm
66 # Use check_runtime from target-supports.exp, which caches 68 # Use check_runtime from target-supports.exp, which caches
67diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp 69diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
68index 9d79b9402e9..e0e5cbb1af8 100644 70index 6dd8fa3fce9..95672008219 100644
69--- a/gcc/testsuite/lib/gcc-dg.exp 71--- a/gcc/testsuite/lib/gcc-dg.exp
70+++ b/gcc/testsuite/lib/gcc-dg.exp 72+++ b/gcc/testsuite/lib/gcc-dg.exp
71@@ -240,9 +240,20 @@ proc schedule-cleanups { opts } { 73@@ -233,9 +233,20 @@ proc schedule-cleanups { opts } {
72 74
73 proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } { 75 proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
74 # Set up the compiler flags, based on what we're going to do. 76 # Set up the compiler flags, based on what we're going to do.
@@ -77,23 +79,23 @@ index 9d79b9402e9..e0e5cbb1af8 100644
77 set options [list] 79 set options [list]
78 80
79+ if [info exists do-what-limit] then { 81+ if [info exists do-what-limit] then {
80+ # Demote run tests to $do-what-limit if set 82+ # Demote run tests to $do-what-limit if set
81+ switch $do_what { 83+ switch $do_what {
82+ run { 84+ run {
83+ set do_what ${do-what-limit} 85+ set do_what ${do-what-limit}
84+ set dg-do-what ${do-what-limit} 86+ set dg-do-what ${do-what-limit}
85+ } 87+ }
86+ } 88+ }
87+ } 89+ }
88+ 90+
89 switch $do_what { 91 switch $do_what {
90 "preprocess" { 92 "preprocess" {
91 set compile_type "preprocess" 93 set compile_type "preprocess"
92diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp 94diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
93index 40f71e9ed8b..10e267fa16d 100644 95index a62f459ad7e..6886cfeee49 100644
94--- a/gcc/testsuite/lib/target-supports.exp 96--- a/gcc/testsuite/lib/target-supports.exp
95+++ b/gcc/testsuite/lib/target-supports.exp 97+++ b/gcc/testsuite/lib/target-supports.exp
96@@ -2155,14 +2155,7 @@ proc check_mips_loongson_mmi_hw_available { } { 98@@ -2949,14 +2949,7 @@ proc check_mips_loongson_mmi_hw_available { } {
97 if { !([istarget mips*-*-*]) } { 99 if { !([istarget mips*-*-*]) } {
98 expr 0 100 expr 0
99 } else { 101 } else {
@@ -109,7 +111,7 @@ index 40f71e9ed8b..10e267fa16d 100644
109 } 111 }
110 }] 112 }]
111 } 113 }
112@@ -2176,29 +2169,7 @@ proc check_mips_msa_hw_available { } { 114@@ -2970,29 +2963,7 @@ proc check_mips_msa_hw_available { } {
113 if { !([istarget mips*-*-*]) } { 115 if { !([istarget mips*-*-*]) } {
114 expr 0 116 expr 0
115 } else { 117 } else {
@@ -140,7 +142,7 @@ index 40f71e9ed8b..10e267fa16d 100644
140 } 142 }
141 }] 143 }]
142 } 144 }
143@@ -9187,6 +9158,7 @@ proc is-effective-target-keyword { arg } { 145@@ -10354,6 +10325,7 @@ proc is-effective-target-keyword { arg } {
144 146
145 proc et-dg-runtest { runtest testcases flags default-extra-flags } { 147 proc et-dg-runtest { runtest testcases flags default-extra-flags } {
146 global dg-do-what-default 148 global dg-do-what-default
@@ -148,7 +150,7 @@ index 40f71e9ed8b..10e267fa16d 100644
148 global EFFECTIVE_TARGETS 150 global EFFECTIVE_TARGETS
149 global et_index 151 global et_index
150 152
151@@ -9194,6 +9166,7 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } { 153@@ -10361,6 +10333,7 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
152 foreach target $EFFECTIVE_TARGETS { 154 foreach target $EFFECTIVE_TARGETS {
153 set target_flags $flags 155 set target_flags $flags
154 set dg-do-what-default compile 156 set dg-do-what-default compile
@@ -156,7 +158,7 @@ index 40f71e9ed8b..10e267fa16d 100644
156 set et_index [lsearch -exact $EFFECTIVE_TARGETS $target] 158 set et_index [lsearch -exact $EFFECTIVE_TARGETS $target]
157 if { [info procs add_options_for_${target}] != [list] } { 159 if { [info procs add_options_for_${target}] != [list] } {
158 set target_flags [add_options_for_${target} "$flags"] 160 set target_flags [add_options_for_${target} "$flags"]
159@@ -9201,8 +9174,10 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } { 161@@ -10368,8 +10341,10 @@ proc et-dg-runtest { runtest testcases flags default-extra-flags } {
160 if { [info procs check_effective_target_${target}_runtime] 162 if { [info procs check_effective_target_${target}_runtime]
161 != [list] && [check_effective_target_${target}_runtime] } { 163 != [list] && [check_effective_target_${target}_runtime] } {
162 set dg-do-what-default run 164 set dg-do-what-default run
@@ -167,67 +169,59 @@ index 40f71e9ed8b..10e267fa16d 100644
167 } 169 }
168 } else { 170 } else {
169 set et_index 0 171 set et_index 0
170@@ -10789,6 +10764,7 @@ proc check_effective_target_sigsetjmp {} { 172@@ -12155,6 +12130,7 @@ proc check_effective_target_sigsetjmp {} {
171 proc check_vect_support_and_set_flags { } { 173 proc check_vect_support_and_set_flags { } {
172 global DEFAULT_VECTCFLAGS 174 global DEFAULT_VECTCFLAGS
173 global dg-do-what-default 175 global dg-do-what-default
174+ global do-what-limit 176+ global do-what-limit
175 global EFFECTIVE_TARGETS 177 global EFFECTIVE_TARGETS
176 178
177 if [istarget powerpc-*paired*] { 179 if [istarget powerpc*-*-*] {
178@@ -10797,6 +10773,7 @@ proc check_vect_support_and_set_flags { } { 180@@ -12186,6 +12162,7 @@ proc check_vect_support_and_set_flags { } {
179 set dg-do-what-default run 181 set DEFAULT_VECTCFLAGS [linsert $DEFAULT_VECTCFLAGS 0 "-mcpu=970"]
180 } else { 182 }
181 set dg-do-what-default compile 183 set dg-do-what-default compile
182+ set do-what-limit link 184+ set do-what-limit link
183 } 185 }
184 } elseif [istarget powerpc*-*-*] { 186 } elseif { [check_effective_target_x86] } {
185 # Skip targets not supporting -maltivec. 187 lappend DEFAULT_VECTCFLAGS "-msse2"
186@@ -10821,6 +10798,7 @@ proc check_vect_support_and_set_flags { } { 188@@ -12193,6 +12170,7 @@ proc check_vect_support_and_set_flags { } {
187 lappend DEFAULT_VECTCFLAGS "-mcpu=970" 189 set dg-do-what-default run
188 } 190 } else {
189 set dg-do-what-default compile 191 set dg-do-what-default compile
190+ set do-what-limit link 192+ set do-what-limit link
191 } 193 }
192 } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
193 lappend DEFAULT_VECTCFLAGS "-msse2"
194@@ -10828,6 +10806,7 @@ proc check_vect_support_and_set_flags { } {
195 set dg-do-what-default run
196 } else {
197 set dg-do-what-default compile
198+ set do-what-limit link
199 }
200 } elseif { [istarget mips*-*-*] 194 } elseif { [istarget mips*-*-*]
201 && [check_effective_target_nomips16] } { 195 && [check_effective_target_nomips16] } {
202@@ -10847,6 +10826,7 @@ proc check_vect_support_and_set_flags { } { 196@@ -12212,6 +12190,7 @@ proc check_vect_support_and_set_flags { } {
203 set dg-do-what-default run 197 set dg-do-what-default run
204 } else { 198 } else {
205 set dg-do-what-default compile 199 set dg-do-what-default compile
206+ set do-what-limit link 200+ set do-what-limit link
207 } 201 }
208 } elseif [istarget alpha*-*-*] { 202 } elseif [istarget alpha*-*-*] {
209 # Alpha's vectorization capabilities are extremely limited. 203 # Alpha's vectorization capabilities are extremely limited.
210@@ -10860,6 +10840,7 @@ proc check_vect_support_and_set_flags { } { 204@@ -12225,6 +12204,7 @@ proc check_vect_support_and_set_flags { } {
211 set dg-do-what-default run 205 set dg-do-what-default run
212 } else { 206 } else {
213 set dg-do-what-default compile 207 set dg-do-what-default compile
214+ set do-what-limit link 208+ set do-what-limit link
215 } 209 }
216 } elseif [istarget ia64-*-*] { 210 } elseif [istarget ia64-*-*] {
217 set dg-do-what-default run 211 set dg-do-what-default run
218@@ -10873,6 +10854,7 @@ proc check_vect_support_and_set_flags { } { 212@@ -12238,6 +12218,7 @@ proc check_vect_support_and_set_flags { } {
219 set dg-do-what-default run 213 set dg-do-what-default run
220 } else { 214 } else {
221 set dg-do-what-default compile 215 set dg-do-what-default compile
222+ set do-what-limit link 216+ set do-what-limit link
223 } 217 }
224 } elseif [istarget aarch64*-*-*] { 218 } elseif [istarget aarch64*-*-*] {
225 set dg-do-what-default run 219 set dg-do-what-default run
226@@ -10897,6 +10879,7 @@ proc check_vect_support_and_set_flags { } { 220@@ -12262,6 +12243,7 @@ proc check_vect_support_and_set_flags { } {
227 } else { 221 } else {
228 lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" 222 lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch"
229 set dg-do-what-default compile 223 set dg-do-what-default compile
230+ set do-what-limit link 224+ set do-what-limit link
231 } 225 }
232 } elseif [istarget amdgcn-*-*] { 226 } elseif [istarget amdgcn-*-*] {
233 set dg-do-what-default run 227 set dg-do-what-default run