Skip to content

Commit 98fe9eb

Browse files
committed
[Rootfs] Exclude some old ABIs from output of expand_* functions
This was [announced](https://discourse.julialang.org/t/psa-intent-to-deprecate-cxx03-libgfortran3-libgfortran4-abis/130799) a few months ago and no one reacted, this implements the suggested changes.
1 parent bb1d736 commit 98fe9eb

File tree

3 files changed

+5
-26
lines changed

3 files changed

+5
-26
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "BinaryBuilderBase"
22
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
33
authors = ["Elliot Saba <[email protected]>"]
4-
version = "1.41.0"
4+
version = "1.42.0"
55

66
[deps]
77
Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0"

src/Rootfs.jl

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -850,17 +850,8 @@ function expand_gfortran_versions(platform::AbstractPlatform)
850850
return [platform] #MSAN doesn't use libgfortran, it uses libflang
851851
end
852852

853-
# If this is an platform that has limited GCC support (such as aarch64-apple-darwin),
854-
# the libgfortran versions we can expand to are similarly limited.
855-
local libgfortran_versions
856-
if Sys.isbsd(platform) && arch(platform) == "aarch64"
857-
libgfortran_versions = [v"5"]
858-
elseif arch(platform) == "riscv64"
859-
# We don't have older GCC versions
860-
libgfortran_versions = [v"5"]
861-
else
862-
libgfortran_versions = [v"3", v"4", v"5"]
863-
end
853+
# At the moment we only support libgfortran 5.
854+
libgfortran_versions = [v"5",]
864855

865856
# Create a new platform for each libgfortran version
866857
return map(libgfortran_versions) do v
@@ -899,8 +890,8 @@ function expand_cxxstring_abis(platform::AbstractPlatform; skip=Sys.isbsd)
899890
return [p]
900891
end
901892

902-
# Otherwise, generate new versions!
903-
map(["cxx03", "cxx11"]) do abi
893+
# Otherwise, generate new versions! At the moment we only support the C++11 string ABI.
894+
map(["cxx11",]) do abi
904895
p = deepcopy(platform)
905896
p["cxxstring_abi"] = abi
906897
return p

test/rootfs.jl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,15 @@ using BinaryBuilderBase: RustBuild, CompilerShard
66
@testset "Expand platforms" begin
77
# expand_gfortran_versions
88
@test expand_gfortran_versions(Platform("i686", "windows")) == [
9-
Platform("i686", "windows"; libgfortran_version=v"3"),
10-
Platform("i686", "windows"; libgfortran_version=v"4"),
119
Platform("i686", "windows"; libgfortran_version=v"5"),
1210
]
1311
@test expand_gfortran_versions([Platform("i686", "windows"), Platform("x86_64", "windows")]) == [
14-
Platform("i686", "windows"; libgfortran_version=v"3"),
15-
Platform("i686", "windows"; libgfortran_version=v"4"),
1612
Platform("i686", "windows"; libgfortran_version=v"5"),
17-
Platform("x86_64", "windows"; libgfortran_version=v"3"),
18-
Platform("x86_64", "windows"; libgfortran_version=v"4"),
1913
Platform("x86_64", "windows"; libgfortran_version=v"5"),
2014
]
2115
@test expand_gfortran_versions([Platform("x86_64", "freebsd"; libgfortran_version=v"3")]) ==
2216
[Platform("x86_64", "freebsd"; libgfortran_version=v"3")]
2317
@test expand_gfortran_versions([Platform("x86_64", "macos"), Platform("aarch64", "macos")]) == [
24-
Platform("x86_64", "macos"; libgfortran_version=v"3"),
25-
Platform("x86_64", "macos"; libgfortran_version=v"4"),
2618
Platform("x86_64", "macos"; libgfortran_version=v"5"),
2719
Platform("aarch64", "macos"; libgfortran_version=v"5"),
2820
]
@@ -34,21 +26,17 @@ using BinaryBuilderBase: RustBuild, CompilerShard
3426

3527
# expand_cxxstring_abis
3628
@test expand_cxxstring_abis(Platform("x86_64", "linux"; libc="musl")) == [
37-
Platform("x86_64", "linux", libc="musl", cxxstring_abi="cxx03"),
3829
Platform("x86_64", "linux", libc="musl", cxxstring_abi="cxx11"),
3930
]
4031
@test expand_cxxstring_abis([Platform("x86_64", "freebsd"), Platform("x86_64", "macos")]) == [
4132
Platform("x86_64", "freebsd"),
4233
Platform("x86_64", "macos"),
4334
]
4435
@test expand_cxxstring_abis([Platform("x86_64", "freebsd"), Platform("x86_64", "macos")]; skip=_->false) == [
45-
Platform("x86_64", "freebsd"; cxxstring_abi="cxx03"),
4636
Platform("x86_64", "freebsd"; cxxstring_abi="cxx11"),
47-
Platform("x86_64", "macos"; cxxstring_abi="cxx03"),
4837
Platform("x86_64", "macos"; cxxstring_abi="cxx11"),
4938
]
5039
@test expand_cxxstring_abis([Platform("x86_64", "freebsd"), Platform("x86_64", "linux")]; skip=Sys.islinux) == [
51-
Platform("x86_64", "freebsd"; cxxstring_abi="cxx03"),
5240
Platform("x86_64", "freebsd"; cxxstring_abi="cxx11"),
5341
Platform("x86_64", "linux"),
5442
]

0 commit comments

Comments
 (0)