Skip to content

Commit 73f531b

Browse files
committed
Auto merge of rust-lang#847 - roblabla:feature-aarch64Newlib, r=alexcrichton
Add aarch64 support to newlib bindings It's all in the title. I grabbed the definition from a small test in with a gcc toolchain, I hope it's correct. There's currently no tests around newlib in the CI. Would it be possible to add them ? If so, how ?
2 parents c1068cd + ae81dc8 commit 73f531b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/unix/newlib/aarch64/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub type c_char = u8;
2+
pub type wchar_t = u32;
3+
4+
pub type c_long = i64;
5+
pub type c_ulong = u64;

src/unix/newlib/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,9 @@ cfg_if! {
679679
if #[cfg(target_arch = "arm")] {
680680
mod arm;
681681
pub use self::arm::*;
682+
} else if #[cfg(target_arch = "aarch64")] {
683+
mod aarch64;
684+
pub use self::aarch64::*;
682685
} else {
683686
// Only tested on ARM so far. Other platforms might have different
684687
// definitions for types and constants.

0 commit comments

Comments
 (0)