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.patch56
1 files changed, 29 insertions, 27 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..454d05d473 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 8845248c81c0695ccc65311017deef824fa538fa 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,10 +26,12 @@ 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 +++++++
@@ -37,10 +39,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
37 3 files changed, 41 insertions(+), 31 deletions(-) 39 3 files changed, 41 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 e028bc93b40..b54a40d6509 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 228c21d1207..d3b88e0419e 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@@ -232,9 +232,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 45435586de2..04942540d8b 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@@ -2483,14 +2483,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@@ -2504,29 +2497,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@@ -9897,6 +9868,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@@ -9904,6 +9876,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@@ -9911,8 +9884,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,7 +169,7 @@ 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@@ -11606,6 +11581,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
@@ -175,7 +177,7 @@ index 40f71e9ed8b..10e267fa16d 100644
175 global EFFECTIVE_TARGETS 177 global EFFECTIVE_TARGETS
176 178
177 if [istarget powerpc-*paired*] { 179 if [istarget powerpc-*paired*] {
178@@ -10797,6 +10773,7 @@ proc check_vect_support_and_set_flags { } { 180@@ -11614,6 +11590,7 @@ proc check_vect_support_and_set_flags { } {
179 set dg-do-what-default run 181 set dg-do-what-default run
180 } else { 182 } else {
181 set dg-do-what-default compile 183 set dg-do-what-default compile
@@ -183,15 +185,15 @@ index 40f71e9ed8b..10e267fa16d 100644
183 } 185 }
184 } elseif [istarget powerpc*-*-*] { 186 } elseif [istarget powerpc*-*-*] {
185 # Skip targets not supporting -maltivec. 187 # Skip targets not supporting -maltivec.
186@@ -10821,6 +10798,7 @@ proc check_vect_support_and_set_flags { } { 188@@ -11644,6 +11621,7 @@ proc check_vect_support_and_set_flags { } {
187 lappend DEFAULT_VECTCFLAGS "-mcpu=970" 189 set DEFAULT_VECTCFLAGS [linsert $DEFAULT_VECTCFLAGS 0 "-mcpu=970"]
188 } 190 }
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-*-*] } { 194 } elseif { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
193 lappend DEFAULT_VECTCFLAGS "-msse2" 195 lappend DEFAULT_VECTCFLAGS "-msse2"
194@@ -10828,6 +10806,7 @@ proc check_vect_support_and_set_flags { } { 196@@ -11651,6 +11629,7 @@ proc check_vect_support_and_set_flags { } {
195 set dg-do-what-default run 197 set dg-do-what-default run
196 } else { 198 } else {
197 set dg-do-what-default compile 199 set dg-do-what-default compile
@@ -199,7 +201,7 @@ index 40f71e9ed8b..10e267fa16d 100644
199 } 201 }
200 } elseif { [istarget mips*-*-*] 202 } elseif { [istarget mips*-*-*]
201 && [check_effective_target_nomips16] } { 203 && [check_effective_target_nomips16] } {
202@@ -10847,6 +10826,7 @@ proc check_vect_support_and_set_flags { } { 204@@ -11670,6 +11649,7 @@ proc check_vect_support_and_set_flags { } {
203 set dg-do-what-default run 205 set dg-do-what-default run
204 } else { 206 } else {
205 set dg-do-what-default compile 207 set dg-do-what-default compile
@@ -207,7 +209,7 @@ index 40f71e9ed8b..10e267fa16d 100644
207 } 209 }
208 } elseif [istarget alpha*-*-*] { 210 } elseif [istarget alpha*-*-*] {
209 # Alpha's vectorization capabilities are extremely limited. 211 # Alpha's vectorization capabilities are extremely limited.
210@@ -10860,6 +10840,7 @@ proc check_vect_support_and_set_flags { } { 212@@ -11683,6 +11663,7 @@ proc check_vect_support_and_set_flags { } {
211 set dg-do-what-default run 213 set dg-do-what-default run
212 } else { 214 } else {
213 set dg-do-what-default compile 215 set dg-do-what-default compile
@@ -215,7 +217,7 @@ index 40f71e9ed8b..10e267fa16d 100644
215 } 217 }
216 } elseif [istarget ia64-*-*] { 218 } elseif [istarget ia64-*-*] {
217 set dg-do-what-default run 219 set dg-do-what-default run
218@@ -10873,6 +10854,7 @@ proc check_vect_support_and_set_flags { } { 220@@ -11696,6 +11677,7 @@ proc check_vect_support_and_set_flags { } {
219 set dg-do-what-default run 221 set dg-do-what-default run
220 } else { 222 } else {
221 set dg-do-what-default compile 223 set dg-do-what-default compile
@@ -223,7 +225,7 @@ index 40f71e9ed8b..10e267fa16d 100644
223 } 225 }
224 } elseif [istarget aarch64*-*-*] { 226 } elseif [istarget aarch64*-*-*] {
225 set dg-do-what-default run 227 set dg-do-what-default run
226@@ -10897,6 +10879,7 @@ proc check_vect_support_and_set_flags { } { 228@@ -11720,6 +11702,7 @@ proc check_vect_support_and_set_flags { } {
227 } else { 229 } else {
228 lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch" 230 lappend DEFAULT_VECTCFLAGS "-march=z14" "-mzarch"
229 set dg-do-what-default compile 231 set dg-do-what-default compile