From: Lu jicong Date: Wed, 3 Jul 2024 11:51:28 +0000 (+0800) Subject: rust: select correct architecture for armv5 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=84464a656c88bb8c5c3b1f57be9804f1551524d5;p=feed%2Fpackages.git rust: select correct architecture for armv5 Currently, armv5 and armv6 targets are both using armv6 rustc. Without this patch, rust programs in armv5 targets throw illegal instruction error. Signed-off-by: Lu jicong --- diff --git a/lang/rust/rust-values.mk b/lang/rust/rust-values.mk index 534aaa02a0..d423d0a87f 100644 --- a/lang/rust/rust-values.mk +++ b/lang/rust/rust-values.mk @@ -52,7 +52,9 @@ endif # ARM Logic ifeq ($(ARCH),arm) - ifeq ($(CONFIG_arm_v7),y) + ifeq ($(CONFIG_arm_v6)$(CONFIG_arm_v7),) + RUSTC_TARGET_ARCH:=$(subst arm,armv5te,$(RUSTC_TARGET_ARCH)) + else ifeq ($(CONFIG_arm_v7),y) RUSTC_TARGET_ARCH:=$(subst arm,armv7,$(RUSTC_TARGET_ARCH)) endif