Skip to content

Commit f662022

Browse files
authored
Move the version check to avoid overwriting unprocessed compiler data
1 parent 62a2eb8 commit f662022

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

c_check

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,6 @@ $architecture = zarch if ($data =~ /ARCH_ZARCH/);
229229
$binformat = bin32;
230230
$binformat = bin64 if ($data =~ /BINARY_64/);
231231

232-
233-
if ($compiler eq "GCC" &&( ($architecture eq "x86") || ($architecture eq "x86_64"))) {
234-
$no_avx2 = 0;
235-
$oldgcc = 0;
236-
$data = `$compiler_name -dumpversion`;
237-
if ($data <= 4.6) {
238-
$no_avx2 = 1;
239-
$oldgcc = 1;
240-
}
241-
}
242232
$no_avx512= 0;
243233
if (($architecture eq "x86") || ($architecture eq "x86_64")) {
244234
eval "use File::Temp qw(tempfile)";
@@ -286,6 +276,15 @@ if ($data =~ /HAVE_C11/) {
286276
}
287277
}
288278

279+
if ($compiler eq "GCC" &&( ($architecture eq "x86") || ($architecture eq "x86_64"))) {
280+
$no_avx2 = 0;
281+
$oldgcc = 0;
282+
$data = `$compiler_name -dumpversion`;
283+
if ($data <= 4.6) {
284+
$no_avx2 = 1;
285+
$oldgcc = 1;
286+
}
287+
}
289288

290289
$data = `$compiler_name $flags -S ctest1.c && grep globl ctest1.s | head -n 1 && rm -f ctest1.s`;
291290

0 commit comments

Comments
 (0)