mirror of
git://git.yoctoproject.org/poky
synced 2026-10-02 18:05:05 +00:00
getrandom patch is accepted upstream with minor changes parking_lot patch has addressed upstream feedback (From OE-Core rev: 9f0f41d8e3fe00df37d926d99fb490614b51dde7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
From 71c356a07fbbf1530cfc87960e975f93bc9007e8 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Tue, 22 Jul 2025 09:46:03 -0700
|
|
Subject: [PATCH] Use getrandom syscall on riscv32/riscv64 linux
|
|
|
|
Minimum kernel needed on RISCV is fairly new (4.15+) so we are sure
|
|
to have getrandom syscall, on glibc there is mimimal ABI kernel to denote
|
|
it but musl does not have any other way to indicate it, so add it
|
|
as a condition here to choose getrandom backend for rv32/rv64 on linux
|
|
when using musl.
|
|
|
|
Upstream-Status: Backport [https://github.com/rust-random/getrandom/pull/699]
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
---
|
|
src/backends/use_file.rs | 17 +++++++++++++++++
|
|
1 file changed, 17 insertions(+)
|
|
|
|
--- a/src/backends.rs
|
|
+++ b/src/backends.rs
|
|
@@ -93,7 +93,15 @@ cfg_if! {
|
|
// Minimum supported Linux kernel version for MUSL targets
|
|
// is not specified explicitly (as of Rust 1.77) and they
|
|
// are used in practice to target pre-3.17 kernels.
|
|
- target_env = "musl",
|
|
+ all(
|
|
+ target_env = "musl",
|
|
+ not(
|
|
+ any(
|
|
+ target_arch = "riscv64",
|
|
+ target_arch = "riscv32",
|
|
+ ),
|
|
+ ),
|
|
+ ),
|
|
),
|
|
)
|
|
))] {
|