diff options
| -rw-r--r-- | meta/recipes-devtools/rust/files/deadcode-backport.patch | 39 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/files/rust-oe-selftest.patch | 17 | ||||
| -rw-r--r-- | meta/recipes-devtools/rust/rust-source.inc | 1 |
3 files changed, 54 insertions, 3 deletions
diff --git a/meta/recipes-devtools/rust/files/deadcode-backport.patch b/meta/recipes-devtools/rust/files/deadcode-backport.patch new file mode 100644 index 0000000000..9ab229eb83 --- /dev/null +++ b/meta/recipes-devtools/rust/files/deadcode-backport.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | Fix the dead code error as follows: | ||
| 2 | |||
| 3 | Compiling coverage-dump v0.1.0 (/home/poky/build-st/tmp/work/core2-64-poky-linux/rust/1.77.0/rustc-1.77.0-src/src/tools/coverage-dump) | ||
| 4 | error: field `0` is never read | ||
| 5 | --> src/tools/coverage-dump/src/covfun.rs:222:15 | ||
| 6 | | | ||
| 7 | 222 | Expansion(u32), | ||
| 8 | | --------- ^^^ | ||
| 9 | | | | ||
| 10 | | field in this variant | ||
| 11 | | | ||
| 12 | = note: `-D dead-code` implied by `-D warnings` | ||
| 13 | = help: to override `-D warnings` add `#[allow(dead_code)]` | ||
| 14 | help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | ||
| 15 | | | ||
| 16 | 222 | Expansion(()), | ||
| 17 | | ~~ | ||
| 18 | |||
| 19 | error: could not compile `coverage-dump` (bin "coverage-dump") due to 1 previous error | ||
| 20 | |||
| 21 | Only the required change is backported here to run the build without any errors. | ||
| 22 | Other changes are merged with the commit in v1.78. | ||
| 23 | |||
| 24 | Upstream-Status: Backport [https://github.com/rust-lang/rust/commit/9a5034a20ed8b055dc615271f9d9cf27f9e494f0#diff-d4ecc6273352a2a8ebd02c45233d9bff7c6694f20b67ddad0614af7a89c06748] | ||
| 25 | |||
| 26 | Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com> | ||
| 27 | --- | ||
| 28 | diff --git a/src/tools/coverage-dump/src/covfun.rs b/src/tools/coverage-dump/src/covfun.rs | ||
| 29 | --- a/src/tools/coverage-dump/src/covfun.rs | ||
| 30 | +++ b/src/tools/coverage-dump/src/covfun.rs | ||
| 31 | @@ -219,7 +219,7 @@ | ||
| 32 | enum MappingKind { | ||
| 33 | Code(CovTerm), | ||
| 34 | Gap(CovTerm), | ||
| 35 | - Expansion(u32), | ||
| 36 | + Expansion(#[allow(dead_code)] u32), | ||
| 37 | Skip, | ||
| 38 | // Using raw identifiers here makes the dump output a little bit nicer | ||
| 39 | // (via the derived Debug), at the expense of making this tool's source | ||
diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch index 2c6e97fa0e..1d287335d4 100644 --- a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch +++ b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch | |||
| @@ -255,10 +255,10 @@ index 1a9d3d3f12f..0a9cfc48806 100644 | |||
| 255 | fn test_get_mut_poison() { | 255 | fn test_get_mut_poison() { |
| 256 | let m = Arc::new(RwLock::new(NonCopy(10))); | 256 | let m = Arc::new(RwLock::new(NonCopy(10))); |
| 257 | let m2 = m.clone(); | 257 | let m2 = m.clone(); |
| 258 | diff --git a/library/std/src/sys/unix/process/process_unix/tests.rs b/library/std/src/sys/unix/process/process_unix/tests.rs | 258 | diff --git a/library/std/src/sys/pal/unix/process/process_unix/tests.rs b/library/std/src/sys/pal/unix/process/process_unix/tests.rs |
| 259 | index 0a6c6ec19fc..bec257bc630 100644 | 259 | index 0a6c6ec19fc..bec257bc630 100644 |
| 260 | --- a/library/std/src/sys/unix/process/process_unix/tests.rs | 260 | --- a/library/std/src/sys/pal/unix/process/process_unix/tests.rs |
| 261 | +++ b/library/std/src/sys/unix/process/process_unix/tests.rs | 261 | +++ b/library/std/src/sys/pal/unix/process/process_unix/tests.rs |
| 262 | @@ -6,6 +6,7 @@ | 262 | @@ -6,6 +6,7 @@ |
| 263 | // safety etc., are tested in tests/ui/process/process-panic-after-fork.rs | 263 | // safety etc., are tested in tests/ui/process/process-panic-after-fork.rs |
| 264 | 264 | ||
| @@ -319,3 +319,14 @@ index 5d6b9e94ee9..a5aacb2eb87 100644 | |||
| 319 | fn test_try_panic_any_message_unit_struct() { | 319 | fn test_try_panic_any_message_unit_struct() { |
| 320 | struct Juju; | 320 | struct Juju; |
| 321 | 321 | ||
| 322 | diff --git a/library/alloc/src/slice/tests.rs b/library/alloc/src/slice/tests.rs | ||
| 323 | --- a/library/alloc/src/slice/tests.rs | ||
| 324 | +++ b/library/alloc/src/slice/tests.rs | ||
| 325 | @@ -186,6 +186,7 @@ | ||
| 326 | std::thread_local!(static SILENCE_PANIC: Cell<bool> = Cell::new(false)); | ||
| 327 | |||
| 328 | #[test] | ||
| 329 | +#[ignore] | ||
| 330 | #[cfg_attr(target_os = "emscripten", ignore)] // no threads | ||
| 331 | #[cfg_attr(not(panic = "unwind"), ignore = "test requires unwinding support")] | ||
| 332 | fn panic_safe() { | ||
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc index dff95ec322..328c5b2d35 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-cargo-do-not-write-host-information-into-compilation.patch;patchdir=${RUSTSRC} \ | 11 | file://0001-cargo-do-not-write-host-information-into-compilation.patch;patchdir=${RUSTSRC} \ |
| 12 | file://rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch;patchdir=${RUSTSRC} \ | 12 | file://rustdoc-repro-issue-fix-cargo-config-for-codegenunits.patch;patchdir=${RUSTSRC} \ |
| 13 | file://cross-targets-backport.patch;patchdir=${RUSTSRC} \ | 13 | file://cross-targets-backport.patch;patchdir=${RUSTSRC} \ |
| 14 | file://deadcode-backport.patch;patchdir=${RUSTSRC} \ | ||
| 14 | file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ | 15 | file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \ |
| 15 | file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \ | 16 | file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \ |
| 16 | " | 17 | " |
