From 0a920dfb6aed35139b44b9a7cdb8abb951db155a Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Thu, 4 Jan 2024 14:06:05 +0100 Subject: [PATCH] webos: solana: Fix build with rust-1.72 and newer :Release Notes: After rust upgrade in oe-core from 1.71.1 to 1.74.1 in: https://git.openembedded.org/openembedded-core/commit/?id=30637cdeb31fae02544fdc643a455d0ebb126ee6 and following commits, solana was failing to build. :Detailed Notes: Backport a fix from v1.17.0: https://github.com/solana-labs/solana/pull/32961 we need only this part: https://github.com/solana-labs/solana/commit/9e703f85de4184f577f22a1c72a0d33612f2feb1#diff-2830a98fa15197faaaf1226883e9011c9302fedb10c7926077b17c07fa320c57 for other fixes we should just upgrade solana in OSE to latest. :Testing Performed: Only build tested. :QA Notes: No change to image. :Issues Addressed: [WRP-29491] Create GPVB with Yocto 5.0 Scarthgap Change-Id: I4b926d3da35a3f2341593f19bb1332b233fc2c2a --- ...s-Fix-build-with-rust-1.72-and-newer.patch | 45 +++++++++++++++++++ .../clang-layer/solana/solana.inc | 4 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 meta-webos/dynamic-layers/clang-layer/solana/files/0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch diff --git a/meta-webos/dynamic-layers/clang-layer/solana/files/0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch b/meta-webos/dynamic-layers/clang-layer/solana/files/0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch new file mode 100644 index 000000000..b5e55c6b4 --- /dev/null +++ b/meta-webos/dynamic-layers/clang-layer/solana/files/0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch @@ -0,0 +1,45 @@ +From f1139989b39b32476be655a451b950cab416c09a Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Thu, 4 Jan 2024 14:02:03 +0100 +Subject: [PATCH] account_info.rs: Fix build with rust-1.72 and newer + +:Release Notes: +After rust upgrade in oe-core from 1.71.1 to 1.74.1 in: +https://git.openembedded.org/openembedded-core/commit/?id=30637cdeb31fae02544fdc643a455d0ebb126ee6 +and following commits, solana was failing to build. + +:Detailed Notes: +Backport a fix from v1.17.0: +https://github.com/solana-labs/solana/pull/32961 + +we need only this part: +https://github.com/solana-labs/solana/commit/9e703f85de4184f577f22a1c72a0d33612f2feb1#diff-2830a98fa15197faaaf1226883e9011c9302fedb10c7926077b17c07fa320c57 + +for other fixes we should just upgrade solana in OSE to latest. + +:Testing Performed: +Only build tested. + +:QA Notes: +No change to image. + +:Issues Addressed: +[WRP-29491] Create GPVB with Yocto 5.0 Scarthgap +--- +Upstream-Status: Backport [v1.17.0: https://github.com/solana-labs/solana/pull/32961] + + sdk/program/src/account_info.rs | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sdk/program/src/account_info.rs b/sdk/program/src/account_info.rs +index 3652e2251e..006390473b 100644 +--- a/sdk/program/src/account_info.rs ++++ b/sdk/program/src/account_info.rs +@@ -181,6 +181,7 @@ impl<'a> AccountInfo<'a> { + Ok(()) + } + ++ #[rustversion::attr(since(1.72), allow(invalid_reference_casting))] + pub fn assign(&self, new_owner: &Pubkey) { + // Set the non-mut owner field + unsafe { diff --git a/meta-webos/dynamic-layers/clang-layer/solana/solana.inc b/meta-webos/dynamic-layers/clang-layer/solana/solana.inc index d1f736a0f..dfebb3e4a 100644 --- a/meta-webos/dynamic-layers/clang-layer/solana/solana.inc +++ b/meta-webos/dynamic-layers/clang-layer/solana/solana.inc @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = " \ inherit cargo inherit pkgconfig -SRC_URI += "git://github.com/solana-labs/solana.git;protocol=https;nobranch=1" +SRC_URI += "git://github.com/solana-labs/solana.git;protocol=https;nobranch=1 \ + file://0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch \ +" SRCREV = "05ffda9b16bfa9c784b22bbb0483f5a567373ae5" S = "${WORKDIR}/git" require solana-crates.inc