diff mbox series

[meta-lts-mixins,wrynose/rust,13/19] rust-target-config: fix invalid +v5 LLVM feature for armv5

Message ID 27cb92a178c059244574872d9074790c74a1bb0b.1794870526.git.scott.murray@konsulko.com
State New
Headers show
Series Update to 1.99.1 | expand

Commit Message

Scott Murray Nov. 16, 2026, 11:12 p.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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 4318e4ab481fce959e0d40ad03446d24917b196c)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/rust-target-config.bbclass | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/classes-recipe/rust-target-config.bbclass b/classes-recipe/rust-target-config.bbclass
index 1cba275..fee19a1 100644
--- a/classes-recipe/rust-target-config.bbclass
+++ b/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")