Skip to content

Commit

Permalink
add initial support for csky-unknown-linux-gnuabiv2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirreke committed Aug 15, 2023
1 parent 618e2c2 commit 3d77fc6
Show file tree
Hide file tree
Showing 8 changed files with 773 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
("target_os", &["switch", "aix", "ohos"]),
("target_env", &["illumos", "wasi", "aix", "ohos"]),
("target_arch", &["loongarch64", "mips32r6", "mips64r6"]),
(
"target_arch",
&["loongarch64", "mips32r6", "mips64r6", "csky"],
),
];

fn main() {
Expand Down
5 changes: 5 additions & 0 deletions src/unix/linux_like/linux/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "m68k",
target_arch = "csky",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
Expand All @@ -100,6 +101,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "m68k",
target_arch = "csky",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
Expand All @@ -116,6 +118,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "m68k",
target_arch = "csky",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
Expand All @@ -142,6 +145,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "m68k",
target_arch = "csky",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
Expand All @@ -153,6 +157,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "m68k",
target_arch = "csky",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
Expand Down
2 changes: 2 additions & 0 deletions src/unix/linux_like/linux/arch/generic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ cfg_if! {
if #[cfg(all(any(target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "csky",
target_arch = "loongarch64"),
not(any(target_env = "musl", target_env = "ohos"))))] {
pub const SO_TIMESTAMP_NEW: ::c_int = 63;
Expand All @@ -115,6 +116,7 @@ cfg_if! {
target_arch = "aarch64",
target_arch = "riscv64",
target_arch = "s390x",
target_arch = "csky",
target_arch = "loongarch64"))] {
pub const FICLONE: ::c_ulong = 0x40049409;
pub const FICLONERANGE: ::c_ulong = 0x4020940D;
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/gnu/b32/csky/align.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(8))]
pub struct max_align_t {
priv_: [i64; 2]
}
}
Loading

0 comments on commit 3d77fc6

Please sign in to comment.