Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-Core][PATCH v2] rust: Merge all rustc-source patches into rust-source.inc
@ 2023-01-07  9:48 Alex Kiernan
  2023-01-16  7:00 ` [PATCH " Kokkonda, Sundeep
  0 siblings, 1 reply; 11+ messages in thread
From: Alex Kiernan @ 2023-01-07  9:48 UTC (permalink / raw)
  To: openembedded-core; +Cc: Alex Kiernan

With the dim-sum approach to patching we had the same patch applied in
many places, but not all, so that there were no guarantees that we were
actually building agaginst the same thing in all recipes.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---
I've no actual evidence, but I wonder if this might help with
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14975 as I tripped
over this whilst doing these changes.

Changes in v2:
- Rebased

 meta/recipes-devtools/rust/cargo_1.66.0.bb    |  8 -------
 .../rust/{rust => files}/hardcodepaths.patch  |  0
 .../rust/{rust => files}/zlib-off64_t.patch   |  0
 meta/recipes-devtools/rust/rust-source.inc    | 22 +++++++++----------
 meta/recipes-devtools/rust/rust_1.66.0.bb     |  3 ---
 5 files changed, 10 insertions(+), 23 deletions(-)
 rename meta/recipes-devtools/rust/{rust => files}/hardcodepaths.patch (100%)
 rename meta/recipes-devtools/rust/{rust => files}/zlib-off64_t.patch (100%)

diff --git a/meta/recipes-devtools/rust/cargo_1.66.0.bb b/meta/recipes-devtools/rust/cargo_1.66.0.bb
index f45f8f1e12d7..2b2394e898b5 100644
--- a/meta/recipes-devtools/rust/cargo_1.66.0.bb
+++ b/meta/recipes-devtools/rust/cargo_1.66.0.bb
@@ -14,14 +14,6 @@ LIC_FILES_CHKSUM = " \
 require rust-source.inc
 require rust-snapshot.inc
 
-SRC_URI:append:class-target = "\
-    file://crossbeam_atomic.patch;patchdir=${RUSTSRC} \
-    file://getrandom-open64.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/hardcodepaths.patch b/meta/recipes-devtools/rust/files/hardcodepaths.patch
similarity index 100%
rename from meta/recipes-devtools/rust/rust/hardcodepaths.patch
rename to meta/recipes-devtools/rust/files/hardcodepaths.patch
diff --git a/meta/recipes-devtools/rust/rust/zlib-off64_t.patch b/meta/recipes-devtools/rust/files/zlib-off64_t.patch
similarity index 100%
rename from meta/recipes-devtools/rust/rust/zlib-off64_t.patch
rename to meta/recipes-devtools/rust/files/zlib-off64_t.patch
diff --git a/meta/recipes-devtools/rust/rust-source.inc b/meta/recipes-devtools/rust/rust-source.inc
index bfb625fb363d..6f1df4561b29 100644
--- a/meta/recipes-devtools/rust/rust-source.inc
+++ b/meta/recipes-devtools/rust/rust-source.inc
@@ -1,21 +1,19 @@
 RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}"
-SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust"
-SRC_URI[rust.sha256sum] = "0dc176e34fae9871f855a6ba4cb30fa19d69c5b4428d29281a07419c4950715c"
 
-SRC_URI:append:class-target:pn-libstd-rs = "\
-    file://0001-Do-not-use-LFS64-on-linux-with-musl.patch;patchdir=../.. \
+SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust \
+            file://crossbeam_atomic.patch;patchdir=${RUSTSRC} \
+            file://hardcodepaths.patch;patchdir=${RUSTSRC} \
+            file://getrandom-open64.patch;patchdir=${RUSTSRC} \
+            file://0001-Do-not-use-LFS64-on-linux-with-musl.patch;patchdir=${RUSTSRC} \
+            file://zlib-off64_t.patch;patchdir=${RUSTSRC} \
 "
-
-SRC_URI:append:class-target:pn-rust = " \
-    file://getrandom-open64.patch \
-    file://0001-Do-not-use-LFS64-on-linux-with-musl.patch \
-    file://zlib-off64_t.patch \
-    file://hardcodepaths.patch \
-    file://crossbeam_atomic.patch"
-SRC_URI:append:class-nativesdk:pn-nativesdk-rust = " file://hardcodepaths.patch"
+SRC_URI[rust.sha256sum] = "0dc176e34fae9871f855a6ba4cb30fa19d69c5b4428d29281a07419c4950715c"
 
 RUSTSRC = "${WORKDIR}/rustc-${RUST_VERSION}-src"
 
+# Used by crossbeam_atomic.patch
+export TARGET_VENDOR
+
 UPSTREAM_CHECK_URI = "https://forge.rust-lang.org/infra/other-installation-methods.html"
 UPSTREAM_CHECK_REGEX = "rustc-(?P<pver>\d+(\.\d+)+)-src"
 
diff --git a/meta/recipes-devtools/rust/rust_1.66.0.bb b/meta/recipes-devtools/rust/rust_1.66.0.bb
index f1ec769aef48..eba933ddeda4 100644
--- a/meta/recipes-devtools/rust/rust_1.66.0.bb
+++ b/meta/recipes-devtools/rust/rust_1.66.0.bb
@@ -218,9 +218,6 @@ FILES:${PN} += "${libdir}/rustlib"
 FILES:${PN} += "${libdir}/*.so"
 FILES:${PN}-dev = ""
 
-# Used by crossbeam_atomic.patch
-export TARGET_VENDOR
-
 do_compile () {
     rust_runx build --stage 2
 }
-- 
2.39.0



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-18 17:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-07  9:48 [OE-Core][PATCH v2] rust: Merge all rustc-source patches into rust-source.inc Alex Kiernan
2023-01-16  7:00 ` [PATCH " Kokkonda, Sundeep
2023-01-16  9:33   ` [OE-core] " Alex Kiernan
2023-01-16 12:17     ` Kokkonda, Sundeep
2023-01-17  0:22       ` [OE-core] " Randy MacLeod
2023-01-18 11:43         ` Kokkonda, Sundeep
2023-01-18 12:01           ` [OE-core] " Alex Kiernan
2023-01-18 12:09             ` Kokkonda, Sundeep
2023-01-18 14:15               ` [OE-core] " Alex Kiernan
2023-01-18 17:05                 ` Kokkonda, Sundeep
2023-01-18 17:25                   ` [OE-core] " Alex Kiernan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox