diff mbox series

[v5,09/12] cargo: Include crossbeam-utils patch

Message ID 20221228152334.25449-10-alex.kiernan@gmail.com
State Accepted, archived
Commit 39402790724014a39b265ee1978396a0514fdc98
Headers show
Series Add rust runtime tests | expand

Commit Message

Alex Kiernan Dec. 28, 2022, 3:23 p.m. UTC
We need patched crossbeam-utils in cargo as well as rust, move cargo
alongside rust so they can both use the same patch.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

Changes in v5:
- Switch from cargo patching to bitbake patching (https://github.com/rust-lang/rust/issues/98185)

Changes in v4:
- Add crossbeam atomics fixes for ppc/mips

 meta/recipes-devtools/{cargo => rust}/cargo_1.66.0.bb    | 9 +++++++--
 .../rust/{rust => files}/crossbeam_atomic.patch          | 0
 2 files changed, 7 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/{cargo => rust}/cargo_1.66.0.bb (93%)
 rename meta/recipes-devtools/rust/{rust => files}/crossbeam_atomic.patch (100%)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/cargo/cargo_1.66.0.bb b/meta/recipes-devtools/rust/cargo_1.66.0.bb
similarity index 93%
rename from meta/recipes-devtools/cargo/cargo_1.66.0.bb
rename to meta/recipes-devtools/rust/cargo_1.66.0.bb
index fe8049b68c9b..f00c67bef5e5 100644
--- a/meta/recipes-devtools/cargo/cargo_1.66.0.bb
+++ b/meta/recipes-devtools/rust/cargo_1.66.0.bb
@@ -11,8 +11,13 @@  LIC_FILES_CHKSUM = " \
     file://LICENSE-THIRD-PARTY;md5=f257ad009884cb88a3a87d6920e7180a \
 "
 
-require recipes-devtools/rust/rust-source.inc
-require recipes-devtools/rust/rust-snapshot.inc
+require rust-source.inc
+require rust-snapshot.inc
+
+SRC_URI:append:class-target = " file://crossbeam_atomic.patch;patchdir=${RUSTSRC}"
+
+# Used by crossbeam_atomic.patch
+export TARGET_VENDOR
 
 S = "${RUSTSRC}/src/tools/cargo"
 CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
diff --git a/meta/recipes-devtools/rust/rust/crossbeam_atomic.patch b/meta/recipes-devtools/rust/files/crossbeam_atomic.patch
similarity index 100%
rename from meta/recipes-devtools/rust/rust/crossbeam_atomic.patch
rename to meta/recipes-devtools/rust/files/crossbeam_atomic.patch