Skip to content

Commit

Permalink
Add Vxworks RISC-V 32 and 64 target specific constants
Browse files Browse the repository at this point in the history
  • Loading branch information
biabbas committed Sep 20, 2024
1 parent a6386af commit 0d2bbac
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ targets = [
"riscv32i-unknown-none-elf",
"riscv32imac-unknown-none-elf",
"riscv32imc-unknown-none-elf",
"riscv32-wrs-vxworks",
"riscv64gc-unknown-freebsd",
"riscv64gc-unknown-hermit",
"riscv64gc-unknown-linux-gnu",
"riscv64gc-unknown-linux-musl",
"riscv64gc-unknown-none-elf",
"riscv64imac-unknown-none-elf",
"riscv64-wrs-vxworks",
"s390x-unknown-linux-gnu",
"s390x-unknown-linux-musl",
"sparc-unknown-linux-gnu",
Expand Down
2 changes: 2 additions & 0 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,13 @@ riscv32i-unknown-none-elf \
riscv32imac-unknown-none-elf \
riscv32imc-unknown-none-elf \
riscv32gc-unknown-linux-gnu \
riscv32-wrs-vxworks \
riscv64gc-unknown-freebsd \
riscv64gc-unknown-hermit \
riscv64gc-unknown-linux-musl \
riscv64gc-unknown-none-elf \
riscv64imac-unknown-none-elf \
riscv64-wrs-vxworks \
s390x-unknown-linux-musl \
sparc-unknown-linux-gnu \
sparc64-unknown-netbsd \
Expand Down
6 changes: 6 additions & 0 deletions src/vxworks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,12 @@ cfg_if! {
} else if #[cfg(target_arch = "powerpc64")] {
mod powerpc64;
pub use self::powerpc64::*;
} else if #[cfg(target_arch = "riscv32")] {
mod riscv32;
pub use self::riscv32::*;
} else if #[cfg(target_arch = "riscv64")] {
mod riscv64;
pub use self::riscv64::*;
} else {
// Unknown target_arch
}
Expand Down
4 changes: 4 additions & 0 deletions src/vxworks/riscv32.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub type c_char = i8;
pub type wchar_t = i32;
pub type c_long = i32;
pub type c_ulong = u32;
4 changes: 4 additions & 0 deletions src/vxworks/riscv64.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pub type c_char = i8;
pub type wchar_t = i32;
pub type c_long = i64;
pub type c_ulong = u64;

0 comments on commit 0d2bbac

Please sign in to comment.