mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 18:32:12 +02:00
cargo-c,rust: Fix build on risv32
Apply fix in libc that are needed for rustix-0.38 to build. (From OE-Core rev: c21fd6f1c0b6a9df9950c541025f24e342b7a118) 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>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From 3665e73b2f087370f8058c12911996b109d8e93a Mon Sep 17 00:00:00 2001
|
||||
From: Dan Gohman <dev@sunfishcode.online>
|
||||
Date: Sun, 6 Apr 2025 05:22:49 -0700
|
||||
Subject: [PATCH] Define more ioctl codes on riscv32gc-unknown-linux-gnu
|
||||
|
||||
Define ioctl codes including `FICLONE` and `FS_IOC32_GETVERSION` on
|
||||
riscv32gc-unknown-linux-gnu.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/rust-lang/libc/pull/4382]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/unix/linux_like/linux/arch/generic/mod.rs | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs
|
||||
index 2f437e1..fdac4bb 100644
|
||||
--- a/src/unix/linux_like/linux/arch/generic/mod.rs
|
||||
+++ b/src/unix/linux_like/linux/arch/generic/mod.rs
|
||||
@@ -114,6 +114,7 @@ cfg_if! {
|
||||
target_arch = "x86_64",
|
||||
target_arch = "arm",
|
||||
target_arch = "aarch64",
|
||||
+ target_arch = "riscv32",
|
||||
target_arch = "riscv64",
|
||||
target_arch = "s390x",
|
||||
target_arch = "csky",
|
||||
@@ -218,7 +219,10 @@ cfg_if! {
|
||||
// where S stands for size (int, long, struct...)
|
||||
// where T stands for type ('f','v','X'...)
|
||||
// where N stands for NR (NumbeR)
|
||||
- if #[cfg(any(target_arch = "x86", target_arch = "arm", target_arch = "csky"))] {
|
||||
+ if #[cfg(any(target_arch = "x86",
|
||||
+ target_arch = "arm",
|
||||
+ target_arch = "csky",
|
||||
+ target_arch = "riscv32"))] {
|
||||
pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80046601;
|
||||
pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40046602;
|
||||
pub const FS_IOC_GETVERSION: ::Ioctl = 0x80047601;
|
||||
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = " \
|
||||
"
|
||||
|
||||
SRC_URI = "crate://crates.io/cargo-c/${PV};name=cargo-c"
|
||||
SRC_URI += "file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${CARGO_VENDORING_DIRECTORY}/libc-0.2.161"
|
||||
SRC_URI[cargo-c.sha256sum] = "5bfa9ba93806384d940e71dafbc185316e0a6a47561b33b7105fcf67f99df70a"
|
||||
S = "${CARGO_VENDORING_DIRECTORY}/cargo-c-${PV}"
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
RUST_VERSION ?= "${@d.getVar('PV').split('-')[0]}"
|
||||
|
||||
SRC_URI += "https://static.rust-lang.org/dist/rustc-${RUST_VERSION}-src.tar.xz;name=rust \
|
||||
file://rv32-cargo-rustix-0.38.40-fix.patch;patchdir=${RUSTSRC} \
|
||||
file://0001-Define-more-ioctl-codes-on-riscv32gc-unknown-linux-g.patch;patchdir=${RUSTSRC} \
|
||||
file://rust-oe-selftest.patch;patchdir=${RUSTSRC} \
|
||||
file://repro-issue-fix-with-cc-crate-hashmap.patch;patchdir=${RUSTSRC} \
|
||||
file://oeqa-selftest-Increase-timeout-in-process-sigpipe-ru.patch;patchdir=${RUSTSRC} \
|
||||
|
||||
Reference in New Issue
Block a user