diff mbox series

rust-target-config: fix invalid +v5 LLVM feature for armv5

Message ID 20261006115610.1667575-1-Hemanth.KumarMD@windriver.com
State Under Review
Headers show
Series rust-target-config: fix invalid +v5 LLVM feature for armv5 | expand

Commit Message

Hemanth Kumar M D Oct. 6, 2026, 11:56 a.m. UTC
From: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>

llvm_features_from_tune() emitted "+v5" for ARMv5 tunes. LLVM does not
recognise "+v5" and silently ignores it:

  '+v5' is not a recognized feature for this target (ignoring feature)

This caused the Rust 1.99 compiler-builtins build to fail:

  error: invalid instruction, any one of the following would fix this:
  note: instruction requires: armv4t
  error: could not compile `compiler_builtins`

Emit the valid +v5te feature instead.

Signed-off-by: Hemanth Kumar M D <Hemanth.KumarMD@windriver.com>
---
 meta/classes-recipe/rust-target-config.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 1cba275b85..fee19a1a64 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/classes-recipe/rust-target-config.bbclass
@@ -53,12 +53,9 @@  def llvm_features_from_tune(d):
 
     if ('armv6' in mach_overrides) or ('armv6' in feat):
         f.append("+v6")
-    if 'armv5te' in feat:
+    if 'armv5' in feat:
         f.append("+strict-align")
         f.append("+v5te")
-    elif 'armv5' in feat:
-        f.append("+strict-align")
-        f.append("+v5")
 
     if ('armv4' in mach_overrides) or ('armv4' in feat):
         f.append("+strict-align")