Skip to content

Commit d9c2aa3

Browse files
committed
Merge branch 'master' into eschnett/riscv64
2 parents 378423f + a79769d commit d9c2aa3

File tree

7 files changed

+622
-18
lines changed

7 files changed

+622
-18
lines changed

Artifacts.toml

Lines changed: 594 additions & 0 deletions
Large diffs are not rendered by default.

Project.toml

Lines changed: 2 additions & 2 deletions
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.30.0"
4+
version = "1.32.0"
55

66
[deps]
77
Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
@@ -41,7 +41,7 @@ Bzip2_jll = "1.0.8"
4141
CodecZlib = "0.5, 0.6, 0.7"
4242
Downloads = "1.5"
4343
Gzip_jll = "1.12.0"
44-
HistoricalStdlibVersions = "0.1, 1"
44+
HistoricalStdlibVersions = "2"
4545
InteractiveUtils = "1.7"
4646
JLLWrappers = "1.4"
4747
JSON = "0.21"

src/BinaryBuilderBase.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ using Pkg, Pkg.Artifacts, Random, Libdl, InteractiveUtils
44
using Base.BinaryPlatforms
55
using Downloads
66
using JSON, OutputCollectors, Scratch
7-
using HistoricalStdlibVersions
7+
import HistoricalStdlibVersions
88

99
# Re-export useful stuff from Base.BinaryPlatforms:
1010
export HostPlatform, platform_dlext, valid_dl_path, arch, libc,
@@ -222,8 +222,8 @@ function __init__()
222222
use_ccache[] = true
223223
end
224224

225-
# Populate `Pkg.Types.STDLIBS_BY_VERSION`
226-
append!(empty!(Pkg.Types.STDLIBS_BY_VERSION), HistoricalStdlibVersions.STDLIBS_BY_VERSION)
225+
# Populate `Pkg.Types.STDLIBS_BY_VERSION`.
226+
HistoricalStdlibVersions.register!()
227227
end
228228

229229

src/Rootfs.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,11 @@ function gcc_version(p::AbstractPlatform,GCC_builds::Vector{GCCBuild},
466466
GCC_builds = filter(b -> getversion(b) v"6", GCC_builds)
467467
end
468468

469+
# We don't have GCC 6 or older for FreeBSD AArch64
470+
if Sys.isfreebsd(p) && arch(p) == "aarch64"
471+
GCC_builds = filter(b -> getversion(b) v"7", GCC_builds)
472+
end
473+
469474
# Rust on Windows requires binutils 2.25 (it invokes `ld` with `--high-entropy-va`),
470475
# which we bundle with GCC 5.
471476
if :rust in compilers && Sys.iswindows(p)
@@ -560,7 +565,7 @@ function choose_shards(p::AbstractPlatform;
560565
compilers::Vector{Symbol} = [:c],
561566
# We always just use the latest Rootfs embedded within our Artifacts.toml
562567
rootfs_build::VersionNumber=last(BinaryBuilderBase.get_available_builds("Rootfs")),
563-
ps_build::VersionNumber=v"2023.06.10",
568+
ps_build::VersionNumber=v"2024.08.10",
564569
GCC_builds::Vector{GCCBuild}=available_gcc_builds,
565570
LLVM_builds::Vector{LLVMBuild}=available_llvm_builds,
566571
Rust_build::VersionNumber=maximum(getversion.(available_rust_builds)),
@@ -726,6 +731,7 @@ function supported_platforms(;exclude::Union{Vector{<:Platform},Function}=Return
726731
Platform("x86_64", "macos"),
727732
Platform("aarch64", "macos"),
728733
Platform("x86_64", "freebsd"),
734+
Platform("aarch64", "freebsd"),
729735

730736
# Windows
731737
Platform("i686", "windows"),
@@ -766,6 +772,8 @@ function expand_gfortran_versions(platform::AbstractPlatform)
766772
local libgfortran_versions
767773
if Sys.isapple(platform) && arch(platform) == "aarch64"
768774
libgfortran_versions = [v"5"]
775+
elseif Sys.isfreebsd(platform) && arch(platform) == "aarch64"
776+
libgfortran_versions = [v"4", v"5"]
769777
else
770778
libgfortran_versions = [v"3", v"4", v"5"]
771779
end

src/Runner.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
310310
if length(unsafe_flags) >= 1
311311
write(io, """
312312
if [[ "\${ARGS[@]}" =~ \"$(join(unsafe_flags, "\"|\""))\" ]]; then
313-
echo -e \"BinaryBuilder: You used one or more of the unsafe flags: $(join(unsafe_flags, ", "))\\nPlease repent.\" >&2
313+
echo -e \"BinaryBuilder error: You used one or more of the unsafe flags: $(join(unsafe_flags, ", "))\\nThis is not allowed, please remove all unsafe flags from your build script to continue.\" >&2
314314
exit 1
315315
fi
316316
""")
@@ -1285,12 +1285,10 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
12851285
# GNU_LIBC_VERSION` would return, if it worked.
12861286
if libc(platform) === "glibc"
12871287
# This should be kept in sync with the version of glibc used in
1288-
# https://github.com/JuliaPackaging/Yggdrasil/blob/master/0_RootFS/gcc_common.jl
1289-
if arch(platform) in ("x86_64", "i686")
1290-
mapping["GNU_LIBC_VERSION"] = "glibc 2.12.2"
1291-
elseif arch(platform) in ("armv7l", "aarch64")
1288+
# https://github.com/JuliaPackaging/Yggdrasil/blob/master/0_RootFS/gcc_sources.jl
1289+
if arch(platform) in ("armv7l", "aarch64")
12921290
mapping["GNU_LIBC_VERSION"] = "glibc 2.19"
1293-
elseif arch(platform) in ("powerpc64le", "riscv64")
1291+
elseif arch(platform) in ("x86_64", "i686", "powerpc64le", "riscv64")
12941292
mapping["GNU_LIBC_VERSION"] = "glibc 2.17"
12951293
end
12961294
end

test/rootfs.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ using BinaryBuilderBase
2525
Platform("x86_64", "macos"; libgfortran_version=v"5"),
2626
Platform("aarch64", "macos"; libgfortran_version=v"5"),
2727
]
28+
@test expand_gfortran_versions(Platform("aarch64", "freebsd")) == [
29+
Platform("aarch64", "freebsd"; libgfortran_version=v"4"),
30+
Platform("aarch64", "freebsd"; libgfortran_version=v"5"),
31+
]
2832
@test expand_gfortran_versions([Platform("x86_64", "linux"; sanitize="memory")]) ==
2933
[Platform("x86_64", "linux"; sanitize="memory")]
3034
@test expand_gfortran_versions(Platform[]) isa Vector{Platform}
@@ -150,6 +154,9 @@ end
150154
# With LLVM 12 we can only use GCC 6+
151155
@test gcc_version(Platform("x86_64", "freebsd"), available_gcc_builds; llvm_version=v"12") ==
152156
filter((v"6"), getversion.(available_gcc_builds))
157+
# We can only use GCC 7+ on AArch64
158+
@test gcc_version(Platform("aarch64", "freebsd"), available_gcc_builds) ==
159+
filter((v"7"), getversion.(available_gcc_builds))
153160

154161
# libgfortran v3 and libstdcxx 22 restrict us to only v4.8, v5.2 and v6.1
155162
p = Platform("x86_64", "linux"; libgfortran_version=v"3", libstdcxx_version=v"3.4.22")

test/runners.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ end
418418
@test !run(ur, cmd, iobuff; tee_stream=devnull)
419419
seekstart(iobuff)
420420
lines = readlines(iobuff)
421-
@test lines[2] == "BinaryBuilder: You used one or more of the unsafe flags: -Ofast, -ffast-math, -funsafe-math-optimizations"
422-
@test lines[3] == "Please repent."
421+
@test lines[2] == "BinaryBuilder error: You used one or more of the unsafe flags: -Ofast, -ffast-math, -funsafe-math-optimizations"
422+
@test lines[3] == "This is not allowed, please remove all unsafe flags from your build script to continue."
423423

424424
ur = preferred_runner()(dir; platform=platform, allow_unsafe_flags=true)
425425
iobuff = IOBuffer()
@@ -545,10 +545,7 @@ end
545545
set -e
546546
make -j${nproc} -sC /usr/share/testsuite install
547547
"""
548-
# This test fails on GitHub Actions with non-squashfs on UserNS runners:
549-
# <https://github.com/JuliaPackaging/BinaryBuilderBase.jl/issues/347>.
550-
is_broken = get(ENV, "GITHUB_ACTIONS", "false")=="true" && !(BinaryBuilderBase.use_squashfs[]) && BinaryBuilderBase.preferred_runner() == BinaryBuilderBase.UserNSRunner
551-
@test run(ur, `/bin/bash -c "$(test_script)"`, iobuff) broken=is_broken
548+
@test run(ur, `/bin/bash -c "$(test_script)"`, iobuff)
552549
end
553550
end
554551
end

0 commit comments

Comments
 (0)