Skip to content

Commit

Permalink
Auto merge of #3301 - Dirreke:csky-unknown-linux-gnuabiv2, r=JohnTitor
Browse files Browse the repository at this point in the history
add initial support for csky-unknown-linux-gnuabiv2

Add libc-files to allow rust to be used on the csky/linux platform with a PR rust-lang/rust#113658 for rust

Signed-off-by:  [`@Dirreke](https://github.com/Dirreke)` [mingyang_ge@163.com](mingyang_ge@163.com)
  • Loading branch information
bors committed Aug 17, 2023
2 parents cd4fc66 + 3d77fc6 commit 92a5d3e
Show file tree
Hide file tree
Showing 8 changed files with 773 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
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
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
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
@@ -0,0 +1,7 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(8))]
pub struct max_align_t {
priv_: [i64; 2]
}
}

0 comments on commit 92a5d3e

Please sign in to comment.