Skip to content

Commit

Permalink
Update aarch64 compiler, add workaround for broken host GCC v11 (#70)
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Nov 4, 2020
1 parent 79d5e73 commit 8d8d4db
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
18 changes: 2 additions & 16 deletions Artifacts.toml
@@ -1,13 +1,13 @@
[["GCCBootstrap-aarch64-apple-darwin14.v11.0.0-iains.x86_64-linux-musl.squashfs"]]
arch = "x86_64"
git-tree-sha1 = "64c870e506f0f6e6004e784c830884fbc3fb056f"
git-tree-sha1 = "4a3caffaeb4b219b3c7976c56619f97217e29418"
lazy = true
libc = "musl"
os = "linux"

[["GCCBootstrap-aarch64-apple-darwin14.v11.0.0-iains.x86_64-linux-musl.unpacked"]]
arch = "x86_64"
git-tree-sha1 = "c1fbed7cf7be10fe7fb973e1dc7865b973226108"
git-tree-sha1 = "0397882e23914502eb0de6294203852eb8e917cf"
lazy = true
libc = "musl"
os = "linux"
Expand Down Expand Up @@ -1332,20 +1332,6 @@ os = "linux"
sha256 = "f4550645592653d21ffcaf1fc67bba734105aaa541fc0468193e358ec303ae2e"
url = "https://github.com/JuliaPackaging/Yggdrasil/releases/download/GCCBootstrap-v9.1.0+2/GCCBootstrap-x86_64-linux-gnu.v9.1.0.x86_64-linux-musl.unpacked.tar.gz"

[["GCCBootstrap-x86_64-linux-musl.v11.0.0-iains.x86_64-linux-musl.squashfs"]]
arch = "x86_64"
git-tree-sha1 = "9e9300a7d0cfa7aa9a26b027e43a1d4bbf3c8f6d"
lazy = true
libc = "musl"
os = "linux"

[["GCCBootstrap-x86_64-linux-musl.v11.0.0-iains.x86_64-linux-musl.unpacked"]]
arch = "x86_64"
git-tree-sha1 = "a1999c031cd6d255819cf34981f7d12af21e6e33"
lazy = true
libc = "musl"
os = "linux"

[["GCCBootstrap-x86_64-linux-musl.v4.8.5.x86_64-linux-musl.squashfs"]]
arch = "x86_64"
git-tree-sha1 = "0528dd9437b8c7b1ec25e8a1aac2fdf2f56cd3c5"
Expand Down
16 changes: 12 additions & 4 deletions src/Rootfs.jl
Expand Up @@ -370,7 +370,7 @@ const available_gcc_builds = [
GCCBuild(v"7.1.0", (libgfortran_version = v"4", libstdcxx_version = v"3.4.23", cxxstring_abi = "cxx11")),
GCCBuild(v"8.1.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.25", cxxstring_abi = "cxx11")),
GCCBuild(v"9.1.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.26", cxxstring_abi = "cxx11")),
GCCBuild(v"11-iains", (libgfortran_version = v"5", libstdcxx_version = v"3.4.26", cxxstring_abi = "cxx11")),
GCCBuild(v"11.0.0-iains", (libgfortran_version = v"5", libstdcxx_version = v"3.4.28", cxxstring_abi = "cxx11")),
]
const available_llvm_builds = [
LLVMBuild(v"6.0.1"),
Expand Down Expand Up @@ -500,6 +500,11 @@ function choose_shards(p::AbstractPlatform;
host_platform = Platform("x86_64", "linux"; libc="musl")

function find_shard(name, version, archive_type; target = nothing)
# Ugly hack alert! Because GCC 11 has somehow broken C++, we pair GCC 9 with GCC 11 on MacOS
if name == "GCCBootstrap" && version.major == 11 && target !== nothing && Sys.islinux(target)
version = v"9.1.0"
end

for cs in all_compiler_shards()
if cs.name == name && cs.version == version &&
(target === nothing || platforms_match(cs.target, target)) &&
Expand All @@ -522,9 +527,12 @@ function choose_shards(p::AbstractPlatform;
return false
end
end
if !shard_exists("GCCBootstrap", getversion(GCC_build), archive_type; target=host_platform)
return false
end

# Ugly hack alert! We disable this check because we don't even ship a GCC 11 build
# for the host platform because it's prerelease and broken.
#if !shard_exists("GCCBootstrap", getversion(GCC_build), archive_type; target=host_platform)
# return false
#end
return true
end

Expand Down

0 comments on commit 8d8d4db

Please sign in to comment.