summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/rust/files/backport-fix-test-string-merging.patch27
-rw-r--r--meta/recipes-devtools/rust/rust-source.inc1
2 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/files/backport-fix-test-string-merging.patch b/meta/recipes-devtools/rust/files/backport-fix-test-string-merging.patch
new file mode 100644
index 0000000000..1e72c100bb
--- /dev/null
+++ b/meta/recipes-devtools/rust/files/backport-fix-test-string-merging.patch
@@ -0,0 +1,27 @@
1From 2d51acd2fbcbadb6f30709c5dd305494d413d388 Mon Sep 17 00:00:00 2001
2From: Jens Reidel <adrian@travitia.xyz>
3Date: Fri, 18 Jul 2025 19:44:20 +0200
4Subject: [PATCH] tests: assembly: cstring-merging: Disable GlobalMerge pass
5
6The test relies on LLVM not merging all the globals into one and would
7currently otherwise fail on powerpc64le.
8
9Signed-off-by: Peter Tatrai <Peter.Tatrai@siemens.com>
10Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/2d51acd2fbcbadb6f30709c5dd305494d413d388]
11---
12 tests/assembly/cstring-merging.rs | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/tests/assembly/cstring-merging.rs b/tests/assembly/cstring-merging.rs
16index f7d0775f7affd..03688e0068b79 100644
17--- a/tests/assembly/cstring-merging.rs
18+++ b/tests/assembly/cstring-merging.rs
19@@ -2,7 +2,7 @@
20 // other architectures (including ARM and x86-64) use the prefix `.Lanon.`
21 //@ only-linux
22 //@ assembly-output: emit-asm
23-//@ compile-flags: --crate-type=lib -Copt-level=3
24+//@ compile-flags: --crate-type=lib -Copt-level=3 -Cllvm-args=-enable-global-merge=0
25 //@ edition: 2024
26
27 use std::ffi::CStr;
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"
15SRC_URI[rust.sha256sum] = "0c1dcbb4f762513d021e1a282c0ac58c0a423642b3a6bf581cafb5414df4193e" 16SRC_URI[rust.sha256sum] = "0c1dcbb4f762513d021e1a282c0ac58c0a423642b3a6bf581cafb5414df4193e"
16 17