Skip to content

Commit 6541eb0

Browse files
committed
ci: mipsel-softfloat — use mipsel-musl image + RUSTFLAGS=+soft-float
The image tag I assumed existed (`mipsel-musl-softfloat`) isn't published by messense; docker-pull errored with "manifest unknown". Available mipsel tags are just `mipsel-musl` (hardfloat) and the regional mirrors of same. Fix: use `messense/rust-musl-cross:mipsel-musl` (the standard hardfloat image) and force soft-float code generation via `RUSTFLAGS=-C target-feature=+soft-float` on top of the nightly `-Z build-std=std,panic_abort` we were already using. build-std recompiles libstd with the same RUSTFLAGS, so libstd itself comes out soft-float even though the image's gcc/musl is hardfloat. We don't link anything beyond libc for mhrv-rs (ring is pure-asm for the crypto hot paths), so the fact that musl libm isn't soft-float doesn't bite us. Net result: the binary emits no hardware FP instructions, which is what MT7621 actually needs.
1 parent cbfdab5 commit 6541eb0

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,16 +150,22 @@ jobs:
150150
cargo build --release --target aarch64-unknown-linux-musl --bin mhrv-rs
151151
sudo chown -R "$(id -u):$(id -g)" target
152152
153-
# OpenWRT MT7621 / mipsel-softfloat. The messense image tag
154-
# `mipsel-musl-softfloat` ships a toolchain that emits soft-float
155-
# insn exclusively — matches the MT7621's FPU-less reality.
156-
# Requires Rust nightly + -Z build-std because mipsel is tier 3
157-
# in the stable channel, which means no pre-built std.
153+
# OpenWRT MT7621 / mipsel-softfloat. messense doesn't publish a
154+
# `:mipsel-musl-softfloat` tag — the mipsel-musl image is
155+
# hardfloat. We build soft-float anyway via
156+
# `RUSTFLAGS=-C target-feature=+soft-float` + `-Z build-std` so
157+
# libstd itself is recompiled to emit soft-float code. The
158+
# gcc/musl shipping in the image is hardfloat but we never link
159+
# anything more than libc (`ring` is pure asm for the crypto
160+
# that matters), so musl's lack of softfloat libm doesn't bite.
161+
# Requires nightly Rust since mipsel is Rust tier 3 in the
162+
# stable channel — no prebuilt std.
158163
- name: Build CLI (mipsel-softfloat via docker)
159164
if: matrix.target == 'mipsel-unknown-linux-musl' && matrix.mipsel_softfloat == true
160165
run: |
161166
docker run --rm -v "$PWD":/src -w /src \
162-
messense/rust-musl-cross:mipsel-musl-softfloat \
167+
-e RUSTFLAGS='-C target-feature=+soft-float' \
168+
messense/rust-musl-cross:mipsel-musl \
163169
sh -c "rustup toolchain install nightly --profile minimal --component rust-src && \
164170
cargo +nightly build --release \
165171
-Z build-std=std,panic_abort \

0 commit comments

Comments
 (0)