Add aarch64 support/CI
diff --git a/.travis.yml b/.travis.yml
index 1a8f394..bda94c1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,6 +31,9 @@
- os: linux
env: TARGET=mips-unknown-linux-gnu
rust: nightly-2015-09-08
+ - os: linux
+ env: TARGET=aarch64-unknown-linux-gnu
+ rust: nightly-2015-09-08
addons:
apt:
packages:
diff --git a/ci/cargo-config b/ci/cargo-config
index 575bdac..f8f6cc2 100644
--- a/ci/cargo-config
+++ b/ci/cargo-config
@@ -6,3 +6,6 @@
[target.mips-unknown-linux-gnu]
linker = "mips-linux-gnu-gcc"
+
+[target.aarch64-unknown-linux-gnu]
+linker = "aarch64-linux-gnu-gcc"
diff --git a/ci/run-travis.sh b/ci/run-travis.sh
index f760306..e4fa0d5 100644
--- a/ci/run-travis.sh
+++ b/ci/run-travis.sh
@@ -23,6 +23,10 @@
curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib
sudo apt-get install gcc-4.7-arm-linux-gnueabihf qemu-user
export CC=arm-linux-gnueabihf-gcc-4.7
+elif [ "$TARGET" = "aarch64-unknown-linux-gnu" ]; then
+ curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib
+ sudo apt-get install gcc-aarch64-linux-gnu qemu-user
+ export CC=aarch64-linux-gnu-gcc
elif [ "$TARGET" = "mips-unknown-linux-gnu" ]; then
# Download pre-built and custom MIPS libs and then also instsall the MIPS
# compiler according to this post:
diff --git a/ci/run.sh b/ci/run.sh
index 9604f1b..16778a9 100644
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -16,6 +16,8 @@
# FIXME: this segfaults on travis, passes locally?
#qemu-mips -L /usr/mips-linux-gnu libc-test/target/$TARGET/debug/all-*
echo skip
+elif [ "$TARGET" = "aarch64-unknown-linux-gnu" ]; then
+ qemu-aarch64 -L /usr/aarch64-linux-gnu/ libc-test/target/$TARGET/debug/libc-test
else
cargo run --manifest-path libc-test/Cargo.toml --target $TARGET
fi
diff --git a/src/unix/notbsd/linux/mips.rs b/src/unix/notbsd/linux/mips.rs
index 8364e7b..35ee3a8 100644
--- a/src/unix/notbsd/linux/mips.rs
+++ b/src/unix/notbsd/linux/mips.rs
@@ -205,6 +205,7 @@
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
pub const FIOCLEX: ::c_ulong = 0x6601;
diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs
index e119bbd..4eeda9d 100644
--- a/src/unix/notbsd/linux/mod.rs
+++ b/src/unix/notbsd/linux/mod.rs
@@ -50,7 +50,7 @@
}
pub struct pthread_mutexattr_t {
- __align: [::c_int; 0],
+ __align: [::c_long; 0],
size: [u8; __SIZEOF_PTHREAD_MUTEXATTR_T],
}
@@ -214,7 +214,6 @@
};
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
pub const __SIZEOF_PTHREAD_COND_T: usize = 48;
-pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
extern {
pub fn shm_open(name: *const c_char, oflag: ::c_int,
diff --git a/src/unix/notbsd/linux/notmips/b32/mod.rs b/src/unix/notbsd/linux/notmips/b32/mod.rs
index fcf75da..8629690 100644
--- a/src/unix/notbsd/linux/notmips/b32/mod.rs
+++ b/src/unix/notbsd/linux/notmips/b32/mod.rs
@@ -19,6 +19,7 @@
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24;
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
s! {
pub struct stat {
diff --git a/src/unix/notbsd/linux/notmips/b64/aarch64.rs b/src/unix/notbsd/linux/notmips/b64/aarch64.rs
index cf23b3f..7452e7d 100644
--- a/src/unix/notbsd/linux/notmips/b64/aarch64.rs
+++ b/src/unix/notbsd/linux/notmips/b64/aarch64.rs
@@ -6,6 +6,7 @@
pub type wchar_t = u32;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8;
s! {
pub struct stat {
diff --git a/src/unix/notbsd/linux/notmips/b64/x86_64.rs b/src/unix/notbsd/linux/notmips/b64/x86_64.rs
index fec4a92..0068fe0 100644
--- a/src/unix/notbsd/linux/notmips/b64/x86_64.rs
+++ b/src/unix/notbsd/linux/notmips/b64/x86_64.rs
@@ -6,6 +6,7 @@
pub type wchar_t = i32;
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40;
+pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;
s! {
pub struct stat {