]> git.99rst.org Git - openwrt-packages.git/commit
rust: build soft-float on soft-float PowerPC subtargets
authorJosef Schlehofer <redacted>
Fri, 7 Aug 2026 22:21:50 +0000 (00:21 +0200)
committerJosef Schlehofer <redacted>
Sun, 16 Aug 2026 06:15:03 +0000 (08:15 +0200)
commit388c3b6ad460779406989575711686f81f17f332
tree7af04d1d2bbf747a32e85a722fc8323a50c20b68
parent9ea0d00d9315bea357d5f359606c8af5dbaa92b9
rust: build soft-float on soft-float PowerPC subtargets

RUSTC_TARGET_ARCH comes from the GNU triple, so every 32-bit PowerPC
subtarget gets powerpc-unknown-linux-musl. That triple is hard-float and
mpc85xx is not: its e500v2 has no floating-point unit, and the toolchain
reports _SOFT_FLOAT and calls __divdf3 for a division.

So rustc emits lfd, stfd and fdiv for a core with no floating-point
registers, and passes doubles in a way nothing else in the image does. It
does not fail outright — a speed test reported negative throughput, and
formatting one of those values tripped an assertion inside core.

Pass -Ctarget-feature=-hard-float where CONFIG_SOFT_FLOAT says so. The same
flag has to reach the std that rust/host builds, or std and the packages
linked against it disagree about how a double is passed.

Signed-off-by: Josef Schlehofer <redacted>
lang/rust/Makefile
lang/rust/rust-values.mk
git clone https://git.99rst.org/PROJECT