Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 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
- Loading branch information