Skip to content

ci: use cross's edge images for multiarch test runs#2457

Merged
ghedo merged 1 commit into
masterfrom
ci-cross-images
May 5, 2026
Merged

ci: use cross's edge images for multiarch test runs#2457
ghedo merged 1 commit into
masterfrom
ci-cross-images

Conversation

@ghedo
Copy link
Copy Markdown
Member

@ghedo ghedo commented May 5, 2026

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.

Split-off from #2446.

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`.
@ghedo ghedo requested a review from a team as a code owner May 5, 2026 11:00
@ghedo ghedo mentioned this pull request May 5, 2026
@ghedo ghedo mentioned this pull request May 5, 2026
@ghedo ghedo merged commit 3f64938 into master May 5, 2026
41 checks passed
@ghedo ghedo deleted the ci-cross-images branch May 5, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants