From 13dbe5b6a7dcd70e673413de2ccaf7e26a63cde0 Mon Sep 17 00:00:00 2001 From: kingingwang Date: Fri, 18 Sep 2026 20:28:45 +0800 Subject: [PATCH] [rust][tools] Fix Cortex-M33 hard-float target selection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit detect_rust_target() 的 Cortex-M33 分支固定返回 thumbv8m.main-none-eabi, 没有使用同函数已计算的 hard_float,而 M4/M7 分支是判断的。 硬浮点 M33 板卡因此拿到软浮点 ABI 的 Rust 库,链接时报 "uses VFP register arguments" 并终止构建。 按 hard_float 选择 eabihf/eabi,与 M4/M7 分支保持一致。 --- components/rust/tools/build_support.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/rust/tools/build_support.py b/components/rust/tools/build_support.py index c1e0c020cb0..f535b198eee 100644 --- a/components/rust/tools/build_support.py +++ b/components/rust/tools/build_support.py @@ -58,7 +58,7 @@ def detect_rust_target(has, rtconfig): return "thumbv8m.base-none-eabi" if has("ARCH_ARM_CORTEX_M33"): # v8m.main - return "thumbv8m.main-none-eabi" + return "thumbv8m.main-none-eabihf" if hard_float else "thumbv8m.main-none-eabi" if has("ARCH_ARM_CORTEX_A"): return "armv7a-none-eabi"