You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: use GCC 13 as cross compiler in dist-aarch64-linux
I'm proposing this GCC upgrade since it addresses bug rust-lang#125619. The regression
in question affects stable release consumers who tend to have no experience
dealing with Rust build tools, so if at all possible, I would like to have it
resolved in the next stable release. I have tried to fix the bug in
`compiler-builtins`, which led to submitting a PR for `compiler-rt` in upstream
LLVM, but it may take a long time before these upstreams to address this
regression.
A summary of why upgrading GCC solves the regression follows. `__multc3()` is a
builtin function `compiler-builtins` exposes for specifically aarch64,
non-Windows targets [1]. The object file for it is included in `staticlib`
archives through `libstd`. The implementation for `__multc3()` is from
`multc3.c`, part of LLVM's `compiler-rt`. Upstream `compiler-rt` normally
builds the C file using the Clang from the same LLVM version. On the
other hand, `compiler-builtins` builds the C file using GCC, outside of the
usual LLVM build system. The upstream implementation doesn't have
feature detection which works for GCC version older than 10, and ends up
producing an unlinkable object.
Upstream LLVM might be slow to respond to this issue as they might deem
`compiler-builtin` as doing something out of the ordinary from their
perspective. They might reasonably assume everyone to build `compiler-rt` using
LLVM's build system.
I have done the following to test this change:
- verified that a local build without this patch exhibits the regression.
- verified that with this patch, the object for `__multc3()` has no reference
to undefined functions in the symbol table.
- verified that with this patch, `rustc` is usable to build Ruby with YJIT,
and that the reported regression is resolved.
[1]: https://github.com/rust-lang/compiler-builtins/blob/c04eb9e1afb72bdf943f5e5d77b3812f40526602/build.rs#L524-L539
0 commit comments