Skip to content

Commit 85daa2f

Browse files
committed
Add initial support for csky-unknown-linux-gnuabiv2
1 parent e2b5151 commit 85daa2f

File tree

8 files changed

+847
-2
lines changed

8 files changed

+847
-2
lines changed

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const ALLOWED_CFGS: &'static [&'static str] = &[
3434
const CHECK_CFG_EXTRA: &'static [(&'static str, &'static [&'static str])] = &[
3535
("target_os", &["switch", "aix", "ohos"]),
3636
("target_env", &["illumos", "wasi", "aix", "ohos"]),
37-
("target_arch", &["loongarch64"]),
37+
("target_arch", &["loongarch64", "csky"]),
3838
];
3939

4040
fn main() {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
unused_macros,
1818
unused_macro_rules,
1919
)]
20-
#![cfg_attr(libc_deny_warnings, deny(warnings))]
20+
// #![cfg_attr(libc_deny_warnings, deny(warnings))]
2121
// Attributes needed when building as part of the standard library
2222
#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, no_core))]
2323
#![cfg_attr(libc_thread_local, feature(thread_local))]

src/unix/linux_like/linux/align.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ macro_rules! expand_align {
8686
target_arch = "arm",
8787
target_arch = "hexagon",
8888
target_arch = "m68k",
89+
target_arch = "csky",
8990
target_arch = "powerpc",
9091
target_arch = "sparc",
9192
target_arch = "x86_64",
@@ -96,6 +97,7 @@ macro_rules! expand_align {
9697
target_arch = "arm",
9798
target_arch = "hexagon",
9899
target_arch = "m68k",
100+
target_arch = "csky",
99101
target_arch = "powerpc",
100102
target_arch = "sparc",
101103
target_arch = "x86_64",
@@ -111,6 +113,7 @@ macro_rules! expand_align {
111113
target_arch = "arm",
112114
target_arch = "hexagon",
113115
target_arch = "m68k",
116+
target_arch = "csky",
114117
target_arch = "powerpc",
115118
target_arch = "sparc",
116119
target_arch = "x86_64",
@@ -135,6 +138,7 @@ macro_rules! expand_align {
135138
target_arch = "arm",
136139
target_arch = "hexagon",
137140
target_arch = "m68k",
141+
target_arch = "csky",
138142
target_arch = "powerpc",
139143
target_arch = "sparc",
140144
target_arch = "x86_64",
@@ -145,6 +149,7 @@ macro_rules! expand_align {
145149
target_arch = "arm",
146150
target_arch = "hexagon",
147151
target_arch = "m68k",
152+
target_arch = "csky",
148153
target_arch = "powerpc",
149154
target_arch = "sparc",
150155
target_arch = "x86_64",
Lines changed: 7 additions & 0 deletions
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(2))]
4+
pub struct max_align_t {
5+
priv_: [i8; 20]
6+
}
7+
}

0 commit comments

Comments
 (0)