Skip to content

Commit bcde7e8

Browse files
authored
[Rootfs] Add GCC 14.2 and make it default for riscv64 (#403)
* [Rootfs] Add GCC 14.2 and make it default for riscv64 GCC 14 has support for the RISV-V Vector Extension 1.0 (RVV1.0), which is important for packages like OpenBLAS. `riscv64` is still niche enough that it's OK to use a more recent, but also more capable, version of GCC as default one. * [CI] Downgrade runner image to Ubuntu 22.04 to avoid problems * Add gcc 14 toolchain for riscv64-linux-musl
1 parent 36a94b7 commit bcde7e8

File tree

6 files changed

+364
-7
lines changed

6 files changed

+364
-7
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
test:
3131
name: Julia ${{ matrix.julia-version }} - x64 - runner ${{ matrix.runner }} - SquashFS ${{ matrix.squashfs }}
3232
timeout-minutes: 60
33-
runs-on: ubuntu-latest
33+
# With unprivileged runner on Ubuntu 24.04 we run into
34+
#
35+
# --> Creating overlay workdir at /proc
36+
# At line 572, ABORTED (13: Permission denied)!
37+
runs-on: ubuntu-22.04
3438
env:
3539
BINARYBUILDER_RUNNER: ${{ matrix.runner }}
3640
BINARYBUILDER_USE_SQUASHFS: ${{ matrix.squashfs }}

Artifacts.toml

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

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 <staticfloat@gmail.com>"]
4-
version = "1.34.2"
4+
version = "1.35.0"
55

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

src/Rootfs.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ get_available_builds(name::String) =
390390
unique!(sort!(VersionNumber.(join.(getindex.(split.(filter(x->startswith(x, name), keys(load_artifacts_toml(joinpath(dirname(@__DIR__), "Artifacts.toml")))), '.'), Ref(2:4)), '.'))))
391391

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

475-
# We only have GCC 13 or newer for RISC-V.
477+
# We only use GCC 14 or newer for riscv64.
476478
if arch(p) == "riscv64"
477-
GCC_builds = filter(b -> getversion(b) v"13", GCC_builds)
479+
GCC_builds = filter(b -> getversion(b) v"14", GCC_builds)
478480
end
479481

480482
# Rust on Windows requires binutils 2.25 (it invokes `ld` with `--high-entropy-va`),

src/Runner.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,8 +555,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
555555
# the wrappers before any additional arguments because we want this path to have
556556
# precedence over anything else. In this way for example we avoid libraries
557557
# from `CompilerSupportLibraries_jll` in `${libdir}` are picked up by mistake.
558-
# Note 2: Compiler libraries for riscv64 ended up in `lib/` by mistake.
559-
dir = "/opt/$(aatriplet(p))/$(aatriplet(p))/lib" * (nbits(p) == 32 || arch(p) == "riscv64" ? "" : "64")
558+
dir = "/opt/$(aatriplet(p))/$(aatriplet(p))/lib" * (nbits(p) == 32 ? "" : "64")
560559
append!(flags, ("-L$(dir)", "-Wl,-rpath-link,$(dir)"))
561560
end
562561
if lock_microarchitecture

test/rootfs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ end
208208
@test gcc_version(p, available_gcc_builds) == [v"7.1.0"]
209209

210210
p = Platform("armv7l", "linux"; march="neonvfpv4")
211-
@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"]
211+
@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"]
212212

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

0 commit comments

Comments
 (0)