diff mbox series

rust: add secure-plt to generated powerpc targets

Message ID 20260910114705.1039230-1-peter.tatrai.ext@siemens.com
State New
Headers show
Series rust: add secure-plt to generated powerpc targets | expand

Commit Message

P. Tatrai Sept. 10, 2026, 11:47 a.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>
---
 meta/classes-recipe/rust-target-config.bbclass | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/meta/classes-recipe/rust-target-config.bbclass b/meta/classes-recipe/rust-target-config.bbclass
index 58c36bfebb..1cba275b85 100644
--- a/meta/classes-recipe/rust-target-config.bbclass
+++ b/meta/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"