diff mbox series

[1/2] rust: disable executable-no-mangle-strip test on PowerPC due to linker issue

Message ID 20250811084334.28553-1-peter.marko@siemens.com
State New
Headers show
Series [1/2] rust: disable executable-no-mangle-strip test on PowerPC due to linker issue | expand

Commit Message

Peter Marko Aug. 11, 2025, 8:43 a.m. UTC
From: Peter Tatrai <peter.tatrai.ext@siemens.com>

The executable-no-mangle-strip test fails on PowerPC target with an undefined
reference error when linking. The linker attempts to resolve this undefined symbol
at link time, causing the test to fail with:
  undefined reference to `THIS_SYMBOL_SHOULD_BE_UNDEFINED'

The test is designed to verify garbage collection behavior of #[no_mangle]
functions and used(compiler)] statics. This appears to be a PowerPC-specific
linker behavior issue.

Temporarily disable this test on PowerPC until the underlying issue is
resolved upstream.

Related upstream issue: https://github.com/rust-lang/rust/issues/144777

Fixes oe-selftest failure:
- tests/ui/linking/executable-no-mangle-strip.rs on powerpc-poky-linux-gnu

Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Tested-by: Peter Marko <peter.marko@siemens.com>
---
 .../rust/files/rust-oe-selftest.patch             | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
index 547807f94c..61f366d18d 100644
--- a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
+++ b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
@@ -4,6 +4,8 @@  ignore them during rust oe-selftest.
 Upstream-Status: Inappropriate [OE testing specific]
 
 Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
+# added executable-no-mangle-strip.rs ignore
+Signed-off-by: Peter Tatrai <Peter.Tatrai@siemens.com>
 ---
 diff --git a/compiler/rustc_errors/src/markdown/tests/term.rs b/compiler/rustc_errors/src/markdown/tests/term.rs
 --- a/compiler/rustc_errors/src/markdown/tests/term.rs
@@ -306,3 +308,16 @@  index 42921442e03..af0edc2ee92 100644
  //@ revisions: OPT0 OPT0_S390X
  //@ [OPT0] ignore-s390x
  //@ [OPT0_S390X] only-s390x
+
+diff --git a/tests/ui/linking/executable-no-mangle-strip.rs b/tests/ui/linking/executable-no-mangle-strip.rs
+index cc283dc53..73cbab9c0 100644
+--- a/tests/ui/linking/executable-no-mangle-strip.rs
++++ b/tests/ui/linking/executable-no-mangle-strip.rs
+@@ -1,5 +1,7 @@
+ //@ run-pass
+ //@ ignore-windows-gnu: only statics marked with used can be GC-ed on windows-gnu
++//@ ignore-powerpc: this test is not working on powerpc
++//  bug report: https://github.com/rust-lang/rust/issues/144777
+ 
+ // Regression test for <https://github.com/rust-lang/rust/issues/139744>.
+ // Functions in the binary marked with no_mangle should be GC-ed if they