Skip to content

Commit e3ccd4b

Browse files
committed
Auto merge of #110562 - ComputerDruid:riscv, r=tmandry
Add definitions for riscv64gc-unknown-fuchsia To compile, also requires a libc update with rust-lang/libc#3204
2 parents cb9aa8c + e7ed5ba commit e3ccd4b

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1937,9 +1937,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
19371937

19381938
[[package]]
19391939
name = "libc"
1940-
version = "0.2.140"
1940+
version = "0.2.142"
19411941
source = "registry+https://github.com/rust-lang/crates.io-index"
1942-
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
1942+
checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317"
19431943
dependencies = [
19441944
"rustc-std-workspace-core",
19451945
]

library/core/src/ffi/mod.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,10 @@ mod c_char_definition {
143143
target_arch = "powerpc"
144144
)
145145
),
146-
all(target_os = "fuchsia", target_arch = "aarch64"),
146+
all(
147+
target_os = "fuchsia",
148+
any(target_arch = "aarch64", target_arch = "riscv64")
149+
),
147150
all(target_os = "nto", target_arch = "aarch64"),
148151
target_os = "horizon"
149152
))] {

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1515
panic_unwind = { path = "../panic_unwind", optional = true }
1616
panic_abort = { path = "../panic_abort" }
1717
core = { path = "../core" }
18-
libc = { version = "0.2.140", default-features = false, features = ['rustc-dep-of-std'] }
18+
libc = { version = "0.2.142", default-features = false, features = ['rustc-dep-of-std'] }
1919
compiler_builtins = { version = "0.1.91" }
2020
profiler_builtins = { path = "../profiler_builtins", optional = true }
2121
unwind = { path = "../unwind" }

library/std/src/os/fuchsia/raw.rs

+6
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,9 @@ mod arch {
286286
pub __unused: [c_long; 3],
287287
}
288288
}
289+
290+
#[cfg(target_arch = "riscv64")]
291+
mod arch {
292+
#[stable(feature = "raw_ext", since = "1.1.0")]
293+
pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
294+
}

0 commit comments

Comments
 (0)