Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rootfs] Add GCC 14.2 and make it default for riscv64 #403

Merged
merged 3 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ jobs:
test:
name: Julia ${{ matrix.julia-version }} - x64 - runner ${{ matrix.runner }} - SquashFS ${{ matrix.squashfs }}
timeout-minutes: 60
runs-on: ubuntu-latest
# With unprivileged runner on Ubuntu 24.04 we run into
#
# --> Creating overlay workdir at /proc
# At line 572, ABORTED (13: Permission denied)!
runs-on: ubuntu-22.04
env:
BINARYBUILDER_RUNNER: ${{ matrix.runner }}
BINARYBUILDER_USE_SQUASHFS: ${{ matrix.squashfs }}
Expand Down
352 changes: 352 additions & 0 deletions Artifacts.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BinaryBuilderBase"
uuid = "7f725544-6523-48cd-82d1-3fa08ff4056e"
authors = ["Elliot Saba <[email protected]>"]
version = "1.34.2"
version = "1.35.0"

[deps]
Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
Expand Down
6 changes: 4 additions & 2 deletions src/Rootfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ get_available_builds(name::String) =
unique!(sort!(VersionNumber.(join.(getindex.(split.(filter(x->startswith(x, name), keys(load_artifacts_toml(joinpath(dirname(@__DIR__), "Artifacts.toml")))), '.'), Ref(2:4)), '.'))))

const available_gcc_builds = [
# For the version of libstdc++ see also <https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html>.
GCCBuild(v"4.8.5", (libgfortran_version = v"3", libstdcxx_version = v"3.4.19", cxxstring_abi = "cxx03")),
GCCBuild(v"5.2.0", (libgfortran_version = v"3", libstdcxx_version = v"3.4.21", cxxstring_abi = "cxx11")),
GCCBuild(v"6.1.0", (libgfortran_version = v"3", libstdcxx_version = v"3.4.22", cxxstring_abi = "cxx11")),
Expand All @@ -400,6 +401,7 @@ const available_gcc_builds = [
GCCBuild(v"11.1.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.29", cxxstring_abi = "cxx11")),
GCCBuild(v"12.1.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.30", cxxstring_abi = "cxx11")),
GCCBuild(v"13.2.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.32", cxxstring_abi = "cxx11")),
GCCBuild(v"14.2.0", (libgfortran_version = v"5", libstdcxx_version = v"3.4.33", cxxstring_abi = "cxx11")),
## v"11.0.0-iains" is a very old build with some ABI incompatibilities with new versions (for example `libgcc_s`
## soversion, see https://github.com/JuliaLang/julia/issues/44435), let's pretend it never existed.
# GCCBuild(v"11.0.0-iains", (libgfortran_version = v"5", libstdcxx_version = v"3.4.28", cxxstring_abi = "cxx11")),
Expand Down Expand Up @@ -472,9 +474,9 @@ function gcc_version(p::AbstractPlatform,
GCC_builds = filter(b -> getversion(b) ≥ v"7", GCC_builds)
end

# We only have GCC 13 or newer for RISC-V.
# We only use GCC 14 or newer for riscv64.
if arch(p) == "riscv64"
GCC_builds = filter(b -> getversion(b) ≥ v"13", GCC_builds)
GCC_builds = filter(b -> getversion(b) ≥ v"14", GCC_builds)
end

# Rust on Windows requires binutils 2.25 (it invokes `ld` with `--high-entropy-va`),
Expand Down
3 changes: 1 addition & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
# the wrappers before any additional arguments because we want this path to have
# precedence over anything else. In this way for example we avoid libraries
# from `CompilerSupportLibraries_jll` in `${libdir}` are picked up by mistake.
# Note 2: Compiler libraries for riscv64 ended up in `lib/` by mistake.
dir = "/opt/$(aatriplet(p))/$(aatriplet(p))/lib" * (nbits(p) == 32 || arch(p) == "riscv64" ? "" : "64")
dir = "/opt/$(aatriplet(p))/$(aatriplet(p))/lib" * (nbits(p) == 32 ? "" : "64")
append!(flags, ("-L$(dir)", "-Wl,-rpath-link,$(dir)"))
end
if lock_microarchitecture
Expand Down
2 changes: 1 addition & 1 deletion test/rootfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ end
@test gcc_version(p, available_gcc_builds) == [v"7.1.0"]

p = Platform("armv7l", "linux"; march="neonvfpv4")
@test gcc_version(p, available_gcc_builds) == [v"5.2.0", v"6.1.0", v"7.1.0", v"8.1.0", v"9.1.0", v"10.2.0", v"11.1.0", v"12.1.0", v"13.2.0", v"12.0.1-iains"]
@test gcc_version(p, available_gcc_builds) == [v"5.2.0", v"6.1.0", v"7.1.0", v"8.1.0", v"9.1.0", v"10.2.0", v"11.1.0", v"12.1.0", v"13.2.0", v"14.2.0", v"12.0.1-iains"]

# When Rust is used on x86_64 Windows, we have to use at least binutils
# 2.25, which we bundle with at least GCC 5.
Expand Down