Skip to content

Commit 92a5d3e

Browse files
committed
Auto merge of #3301 - Dirreke:csky-unknown-linux-gnuabiv2, r=JohnTitor
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)` [[email protected]]([email protected])
2 parents cd4fc66 + 3d77fc6 commit 92a5d3e

File tree

8 files changed

+773
-1
lines changed

8 files changed

+773
-1
lines changed

build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
3535
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
3636
("target_os", &["switch", "aix", "ohos"]),
3737
("target_env", &["illumos", "wasi", "aix", "ohos"]),
38-
("target_arch", &["loongarch64", "mips32r6", "mips64r6"]),
38+
(
39+
"target_arch",
40+
&["loongarch64", "mips32r6", "mips64r6", "csky"],
41+
),
3942
];
4043

4144
fn main() {

src/unix/linux_like/linux/align.rs

+5
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ macro_rules! expand_align {
8989
target_arch = "arm",
9090
target_arch = "hexagon",
9191
target_arch = "m68k",
92+
target_arch = "csky",
9293
target_arch = "powerpc",
9394
target_arch = "sparc",
9495
target_arch = "x86_64",
@@ -100,6 +101,7 @@ macro_rules! expand_align {
100101
target_arch = "arm",
101102
target_arch = "hexagon",
102103
target_arch = "m68k",
104+
target_arch = "csky",
103105
target_arch = "powerpc",
104106
target_arch = "sparc",
105107
target_arch = "x86_64",
@@ -116,6 +118,7 @@ macro_rules! expand_align {
116118
target_arch = "arm",
117119
target_arch = "hexagon",
118120
target_arch = "m68k",
121+
target_arch = "csky",
119122
target_arch = "powerpc",
120123
target_arch = "sparc",
121124
target_arch = "x86_64",
@@ -142,6 +145,7 @@ macro_rules! expand_align {
142145
target_arch = "arm",
143146
target_arch = "hexagon",
144147
target_arch = "m68k",
148+
target_arch = "csky",
145149
target_arch = "powerpc",
146150
target_arch = "sparc",
147151
target_arch = "x86_64",
@@ -153,6 +157,7 @@ macro_rules! expand_align {
153157
target_arch = "arm",
154158
target_arch = "hexagon",
155159
target_arch = "m68k",
160+
target_arch = "csky",
156161
target_arch = "powerpc",
157162
target_arch = "sparc",
158163
target_arch = "x86_64",

src/unix/linux_like/linux/arch/generic/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ cfg_if! {
9595
if #[cfg(all(any(target_arch = "x86",
9696
target_arch = "x86_64",
9797
target_arch = "aarch64",
98+
target_arch = "csky",
9899
target_arch = "loongarch64"),
99100
not(any(target_env = "musl", target_env = "ohos"))))] {
100101
pub const SO_TIMESTAMP_NEW: ::c_int = 63;
@@ -115,6 +116,7 @@ cfg_if! {
115116
target_arch = "aarch64",
116117
target_arch = "riscv64",
117118
target_arch = "s390x",
119+
target_arch = "csky",
118120
target_arch = "loongarch64"))] {
119121
pub const FICLONE: ::c_ulong = 0x40049409;
120122
pub const FICLONERANGE: ::c_ulong = 0x4020940D;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
s_no_extra_traits! {
2+
#[allow(missing_debug_implementations)]
3+
#[repr(align(8))]
4+
pub struct max_align_t {
5+
priv_: [i64; 2]
6+
}
7+
}

0 commit comments

Comments
 (0)