]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
rust: backport cstring-merging test fix for PowerPC targets
authorPeter Tatrai <peter.tatrai.ext@siemens.com>
Mon, 11 Aug 2025 08:43:34 +0000 (10:43 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Aug 2025 07:18:49 +0000 (08:18 +0100)
commit2435b16b050ebdca0f70fe9ed1eebfdd3bacf19d
tree21ef0bbf6b3f61623eb240297d25fdf56ec3cde2
parent58ccb78de7e87f2f17d8ee47be545de49b8e2450
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

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>
meta/recipes-devtools/rust/files/backport-fix-test-string-merging.patch [new file with mode: 0644]
meta/recipes-devtools/rust/rust-source.inc