ci: use cross's edge images for multiarch test runs#2457
Merged
Conversation
The default `cross` images shipped with `cross 0.2.5` (2022) carry pre-C++17 g++ toolchains, which can't compile the upgraded BoringSSL (it needs C++17 headers like `<string_view>`). Override them with `cross`'s `edge` images, which are rebuilt regularly from cross's `main` branch and carry a current toolchain. The `edge` image for `i686-unknown-linux-gnu` is set up differently from the others: it's a 32-bit-native userspace shipping only the unprefixed `gcc`/`g++` toolchain, missing some of the 32-bit dev libraries needed by `cmake`'s compiler-detection probe, and lacks the cross-prefixed binary names that `cross` and `cc-rs` expect. Add a `pre-build` step to install `libc6-dev-i386 g++-multilib` and to symlink `i686-linux-gnu-gcc`/`-g++` to the unprefixed compilers. Separately, BoringSSL's x86 assembly requires SSE2. The 32-bit toolchain file sets `-msse2`, but cmake-rs passes `-DCMAKE_C_FLAGS=...` on the command line which wins over the toolchain file's CACHE STRING, leaving SSE2 unset in the actual build flags. Add `-msse2` (and `-mfpmath=sse`) for the x86 build path in `build.rs` so they make it into the final flags regardless. An earlier attempt switched the multiarch CI job from `cross` to native apt cross-toolchains plus `qemu-user-static`. That approach worked but `qemu-user-static` introduced enough nondeterminism in microsecond-level timing that several BBR2-parameterized byte-count assertions started flaking on aarch64 and armv7 across different runs of the same code. `cross`'s Docker+QEMU setup is deterministic enough in practice to keep those tests stable, so we keep using `cross` and address its toolchain age via `Cross.toml`.
LPardue
approved these changes
May 5, 2026
jannes
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The default
crossimages shipped withcross 0.2.5(2022) carry pre-C++17 g++ toolchains, which can't compile the upgraded BoringSSL (it needs C++17 headers like<string_view>). Override them withcross'sedgeimages, which are rebuilt regularly from cross'smainbranch and carry a current toolchain.The
edgeimage fori686-unknown-linux-gnuis set up differently from the others: it's a 32-bit-native userspace shipping only the unprefixedgcc/g++toolchain, missing some of the 32-bit dev libraries needed bycmake's compiler-detection probe, and lacks the cross-prefixed binary names thatcrossandcc-rsexpect. Add apre-buildstep to installlibc6-dev-i386 g++-multiliband to symlinki686-linux-gnu-gcc/-g++to the unprefixed compilers.Separately, BoringSSL's x86 assembly requires SSE2. The 32-bit toolchain file sets
-msse2, but cmake-rs passes-DCMAKE_C_FLAGS=...on the command line which wins over the toolchain file's CACHE STRING, leaving SSE2 unset in the actual build flags. Add-msse2(and-mfpmath=sse) for the x86 build path inbuild.rsso they make it into the final flags regardless.An earlier attempt switched the multiarch CI job from
crossto native apt cross-toolchains plusqemu-user-static. That approach worked butqemu-user-staticintroduced enough nondeterminism in microsecond-level timing that several BBR2-parameterized byte-count assertions started flaking on aarch64 and armv7 across different runs of the same code.cross's Docker+QEMU setup is deterministic enough in practice to keep those tests stable, so we keep usingcrossand address its toolchain age viaCross.toml.Split-off from #2446.