Skip to content

Commit f73c892

Browse files
authored
[Rootfs] Require GCC 7 for AVX512 microarchitecture (#300)
1 parent 29a34f5 commit f73c892

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/Rootfs.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,17 @@ function gcc_version(p::AbstractPlatform,GCC_builds::Vector{GCCBuild},
480480
# "sandybridge", "haswell", "cortex-a53" introduced in GCC v4.9.0:
481481
# https://www.gnu.org/software/gcc/gcc-4.9/changes.html
482482
GCC_builds = filter(b -> getversion(b) >= v"4.9", GCC_builds)
483-
elseif march(p) in ("avx512", "power9")
484-
# "skylake-avx512" and "power9" introduced in GCC v6.1:
483+
elseif march(p) in ("power9",)
484+
# "power9" introduced in GCC v6.1:
485485
# https://www.gnu.org/software/gcc/gcc-6/changes.html
486486
GCC_builds = filter(b -> getversion(b) >= v"6.1", GCC_builds)
487-
elseif march(p) in ("armv8_1",)
487+
elseif march(p) in ("avx512", "armv8_1")
488488
# "thunderx2t99" introduced in GCC v7.1:
489-
# https://www.gnu.org/software/gcc/gcc-7/changes.html
489+
# <https://www.gnu.org/software/gcc/gcc-7/changes.html>.
490+
# "skylake-avx512" introduced in GCC v6.1, but header files were broken
491+
# in that release:
492+
# <https://github.com/JuliaPackaging/Yggdrasil/pull/4485#issuecomment-1048226993>
493+
# <https://github.com/JuliaPackaging/Yggdrasil/pull/6392#discussion_r1138808437>.
490494
GCC_builds = filter(b -> getversion(b) >= v"7.1", GCC_builds)
491495
elseif march(p) in ("armv8_2_crypto",)
492496
# `cortex-a76` target introduced in GCC v9.1:

test/rootfs.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ end
160160
# Adding `"cxx11"` eliminates `v"4.X"`:
161161
p = Platform("x86_64", "linux"; libgfortran_version=v"3", cxxstring_abi="cxx11")
162162
@test gcc_version(p, available_gcc_builds) == [v"5.2.0", v"6.1.0"]
163-
p["march"] = "avx512"
164-
@test gcc_version(p, available_gcc_builds) == [v"6.1.0"]
163+
# AVX-512 requires GCC 7
164+
p = Platform("x86_64", "linux"; cxxstring_abi="cxx11", march = "avx512")
165+
@test first(sort!(gcc_version(p, available_gcc_builds))) == v"7.1.0"
165166

166167
# Just libgfortran v3 allows GCC 6 as well though
167168
p = Platform("x86_64", "linux"; libgfortran_version=v"3")

0 commit comments

Comments
 (0)