Skip to content

Commit 2f0d727

Browse files
shr-projectywbyun0815
authored andcommitted
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: solana-labs/solana#32961 we need only this part: solana-labs/solana@9e703f8#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: [WRQ-9293] CCC: solana: Fix build with rust-1.72 and newer [WRP-29491] Create GPVB with Yocto 5.0 Scarthgap Cherry-picked-from-commit: 76222be Cherry-picked-from-branch:
1 parent 0d1d9b5 commit 2f0d727

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
From f1139989b39b32476be655a451b950cab416c09a Mon Sep 17 00:00:00 2001
2+
From: Martin Jansa <martin2.jansa@lgepartner.com>
3+
Date: Thu, 4 Jan 2024 14:02:03 +0100
4+
Subject: [PATCH] account_info.rs: Fix build with rust-1.72 and newer
5+
6+
:Release Notes:
7+
After rust upgrade in oe-core from 1.71.1 to 1.74.1 in:
8+
https://git.openembedded.org/openembedded-core/commit/?id=30637cdeb31fae02544fdc643a455d0ebb126ee6
9+
and following commits, solana was failing to build.
10+
11+
:Detailed Notes:
12+
Backport a fix from v1.17.0:
13+
https://github.com/solana-labs/solana/pull/32961
14+
15+
we need only this part:
16+
https://github.com/solana-labs/solana/commit/9e703f85de4184f577f22a1c72a0d33612f2feb1#diff-2830a98fa15197faaaf1226883e9011c9302fedb10c7926077b17c07fa320c57
17+
18+
for other fixes we should just upgrade solana in OSE to latest.
19+
20+
:Testing Performed:
21+
Only build tested.
22+
23+
:QA Notes:
24+
No change to image.
25+
26+
:Issues Addressed:
27+
[WRP-29491] Create GPVB with Yocto 5.0 Scarthgap
28+
---
29+
Upstream-Status: Backport [v1.17.0: https://github.com/solana-labs/solana/pull/32961]
30+
31+
sdk/program/src/account_info.rs | 1 +
32+
1 file changed, 1 insertion(+)
33+
34+
diff --git a/sdk/program/src/account_info.rs b/sdk/program/src/account_info.rs
35+
index 3652e2251e..006390473b 100644
36+
--- a/sdk/program/src/account_info.rs
37+
+++ b/sdk/program/src/account_info.rs
38+
@@ -181,6 +181,7 @@ impl<'a> AccountInfo<'a> {
39+
Ok(())
40+
}
41+
42+
+ #[rustversion::attr(since(1.72), allow(invalid_reference_casting))]
43+
pub fn assign(&self, new_owner: &Pubkey) {
44+
// Set the non-mut owner field
45+
unsafe {

meta-webos/dynamic-layers/clang-layer/solana/solana.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = " \
77
inherit cargo
88
inherit pkgconfig
99

10-
SRC_URI += "git://github.com/solana-labs/solana.git;protocol=https;nobranch=1"
10+
SRC_URI += "git://github.com/solana-labs/solana.git;protocol=https;nobranch=1 \
11+
file://0001-account_info.rs-Fix-build-with-rust-1.72-and-newer.patch \
12+
"
1113
SRCREV = "05ffda9b16bfa9c784b22bbb0483f5a567373ae5"
1214
S = "${WORKDIR}/git"
1315
require solana-crates.inc

0 commit comments

Comments
 (0)