mirror of
https://github.com/openwrt/packages.git
synced 2026-10-12 10:17:17 +04:00
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 <pepe@bloodkings.eu>