diff mbox series

[meta-lts-mixins,wrynose/rust,01/19] rust: add secure-plt to generated powerpc targets

Message ID a039f4ce86697e3cc84e38f8724637f42569a69d.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: Peter Tatrai <peter.tatrai.ext@siemens.com>

Rust's built-in powerpc-unknown-linux-gnu target has used the
+secure-plt feature since rust-lang/rust#136154. OpenEmbedded generates
its own powerpc-poky-linux-gnu target specification, however, and the
feature was missing there. Consequently LLVM emitted objects that were
incompatible with the secure-plt toolchain default, making ld fall back
to bss-plt and print a diagnostic that rustc 1.97+ exposes through the
linker_messages lint.

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(adapted from oe-core commit 88c0d94bc177bd8e3edc016316c92528c6d38586)
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
---
 classes-recipe/rust-target-config.bbclass | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/classes-recipe/rust-target-config.bbclass b/classes-recipe/rust-target-config.bbclass
index 58c36bf..1cba275 100644
--- a/classes-recipe/rust-target-config.bbclass
+++ b/classes-recipe/rust-target-config.bbclass
@@ -254,6 +254,7 @@  TARGET_ENDIAN[powerpc] = "big"
 TARGET_POINTER_WIDTH[powerpc] = "32"
 TARGET_C_INT_WIDTH[powerpc] = "32"
 MAX_ATOMIC_WIDTH[powerpc] = "32"
+FEATURES[powerpc] = "+secure-plt"
 
 ## powerpc64-unknown-linux-{gnu, musl}
 DATA_LAYOUT[powerpc64] = "E-m:e-Fi64-i64:64-i128:128-n32:64-S128-v256:256:256-v512:512:512"