diff options
| author | Peter Tatrai <peter.tatrai.ext@siemens.com> | 2025-08-11 10:43:34 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-14 10:31:10 +0100 |
| commit | 125ff9747b15ffddcc537bf4dfd9bf90ab189d67 (patch) | |
| tree | b8346305b2ed4a7ab70aef23ad69e0c867886a14 /meta/recipes-devtools/rust/rust-source.inc | |
| parent | 65e4a4739e7ba2b816224f26825df3ad386ac299 (diff) | |
| download | poky-125ff9747b15ffddcc537bf4dfd9bf90ab189d67.tar.gz | |
rust: backport cstring-merging test fix for PowerPC targets
The Rust cstring-merging assembly test was failing on PowerPC targets due to
LLVM's GlobalMerge optimization pass merging all global string constants into
a single merged global. This caused the test's CHECK directives to fail as
they expected separate .Lanon labels for each string literal ("foo", "bar",
"baz").
The test verifies that C-style string literals are correctly placed in
mergeable read-only sections (.rodata.str1.1) with proper section flags
(aMS - Allocatable, Merge, Strings) for linker optimization.
This backports the upstream fix that disables the GlobalMerge pass
(-Cllvm-args=-enable-global-merge=0) specifically for this test, allowing
it to verify the expected assembly structure without interference from
the optimization.
Fixes test failure:
- tests/assembly/cstring-merging.rs on powerpc-poky-linux-gnu
Backport of https://github.com/rust-lang/rust/commit/2d51acd2fbcbadb6f30709c5dd305494d413d388
(From OE-Core rev: 2435b16b050ebdca0f70fe9ed1eebfdd3bacf19d)
Signed-off-by: Peter Tatrai <peter.tatrai.ext@siemens.com>
Tested-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/rust/rust-source.inc')
| -rw-r--r-- | meta/recipes-devtools/rust/rust-source.inc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index 1a5d98d9dc..8f341a0e5b 100644 --- a/meta/recipes-devtools/rust/rust-source.inc +++ b/meta/recipes-devtools/rust/rust-source.inc | |||
| @@ -11,6 +11,7 @@ SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;n | |||
| 11 | file://0001-Disable-libunwind-cross-architecture-unwinding.patch;patchdir=${RUSTSRC} \ | 11 | file://0001-Disable-libunwind-cross-architecture-unwinding.patch;patchdir=${RUSTSRC} \ |
| 12 | file://triagebot.patch;patchdir=${RUSTSRC} \ | 12 | file://triagebot.patch;patchdir=${RUSTSRC} \ |
| 13 | file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \ | 13 | file://0001-riscv32-Define-plain-syscalls-as-their-time64-varian.patch;patchdir=${RUSTSRC} \ |
| 14 | file://backport-fix-test-string-merging.patch;patchdir=${RUSTSRC} \ | ||
| 14 | " | 15 | " |
| 15 | SRC_URI[rust.sha256sum] = "0c1dcbb4f762513d021e1a282c0ac58c0a423642b3a6bf581cafb5414df4193e" | 16 | SRC_URI[rust.sha256sum] = "0c1dcbb4f762513d021e1a282c0ac58c0a423642b3a6bf581cafb5414df4193e" |
| 16 | 17 | ||
