Auto merge of #369 - alexcrichton:musl-mips, r=alexcrichton

Add CI for mipsel-unknown-linux-musl

Download a trunk OpenWRT toolchain and verify bindings against that. Also fixup
a few stray errors today
This commit is contained in:
bors 2016-08-28 16:25:40 -07:00 committed by GitHub
commit 9f8ec72ec0
9 changed files with 87 additions and 13 deletions

View File

@ -79,6 +79,9 @@ matrix:
- os: linux
env: TARGET=powerpc64-unknown-linux-gnu
rust: stable
- os: linux
env: TARGET=mipsel-unknown-linux-musl
rust: stable
# beta
- os: linux

View File

@ -0,0 +1,14 @@
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
gcc libc6-dev qemu-user ca-certificates qemu-system-mips curl \
bzip2
RUN mkdir /toolchain
RUN curl -L https://downloads.openwrt.org/snapshots/trunk/malta/generic/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
tar xjf - -C /toolchain --strip-components=2
ENV PATH=$PATH:/rust/bin:/toolchain/bin \
CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
CARGO_TARGET_MIPSEL_UNKNOWN_LINUX_MUSL_LINKER=mipsel-openwrt-linux-gcc

View File

@ -117,6 +117,10 @@ case "$TARGET" in
qemu-mips -L /usr/mips-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
;;
mipsel-unknown-linux-musl)
qemu-mipsel -L /toolchain $CARGO_TARGET_DIR/$TARGET/debug/libc-test
;;
powerpc-unknown-linux-gnu)
qemu-ppc -L /usr/powerpc-linux-gnu $CARGO_TARGET_DIR/$TARGET/debug/libc-test
;;

View File

@ -82,6 +82,14 @@ s! {
pub f_flags: ::c_ulong,
pub f_spare: [::c_ulong; 4],
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
}
pub const O_DIRECT: ::c_int = 0x4000;
@ -306,3 +314,8 @@ pub const TIOCCONS: ::c_int = 0x541D;
pub const SYS_gettid: ::c_long = 224;
pub const SYS_perf_event_open: ::c_long = 364;
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLWRBAND: ::c_short = 0x200;

View File

@ -82,6 +82,14 @@ s! {
pub f_flags: ::c_ulong,
pub f_spare: [::c_ulong; 4],
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
}
pub const O_DIRECT: ::c_int = 0x4000;
@ -305,3 +313,8 @@ pub const FIONREAD: ::c_int = 0x541B;
pub const TIOCCONS: ::c_int = 0x541D;
pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit)
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLWRBAND: ::c_short = 0x200;

View File

@ -81,6 +81,14 @@ s! {
pub f_flags: ::c_ulong,
pub f_spare: [::c_ulong; 5],
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_code: ::c_int,
pub si_errno: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
}
pub const O_DIRECT: ::c_int = 0o100000;
@ -299,9 +307,14 @@ pub const TIOCSWINSZ: ::c_int = 0x80087467;
pub const TIOCMGET: ::c_int = 0x741D;
pub const TIOCMBIS: ::c_int = 0x741B;
pub const TIOCMBIC: ::c_int = 0x741C;
pub const TIOCMSET: ::c_int = 0x741D;
pub const TIOCMSET: ::c_int = 0x741A;
pub const FIONREAD: ::c_int = 0x467F;
pub const TIOCCONS: ::c_int = 0x80047478;
pub const SYS_gettid: ::c_long = 4222; // Valid for O32
pub const SYS_perf_event_open: ::c_long = 4333; // Valid for O32
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
pub const RUSAGE_CHILDREN: ::c_int = !0;
pub const POLLWRNORM: ::c_short = 0x4;
pub const POLLWRBAND: ::c_short = 0x100;

View File

@ -95,6 +95,14 @@ s! {
pub uc_sigmask: ::sigset_t,
__private: [u8; 112],
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
}
pub const O_DIRECT: ::c_int = 0x4000;
@ -320,3 +328,8 @@ pub const TIOCCONS: ::c_int = 0x541D;
pub const SYS_gettid: ::c_long = 224;
pub const SYS_perf_event_open: ::c_long = 336;
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLWRBAND: ::c_short = 0x200;

View File

@ -103,6 +103,14 @@ s! {
pub struct sem_t {
__val: [::c_int; 8],
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
}
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
@ -329,6 +337,11 @@ pub const TIOCMSET: ::c_int = 0x5418;
pub const FIONREAD: ::c_int = 0x541B;
pub const TIOCCONS: ::c_int = 0x541D;
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLWRBAND: ::c_short = 0x200;
cfg_if! {
if #[cfg(target_arch = "aarch64")] {
mod aarch64;

View File

@ -18,14 +18,6 @@ s! {
_restorer: *mut ::c_void,
}
pub struct siginfo_t {
pub si_signo: ::c_int,
pub si_errno: ::c_int,
pub si_code: ::c_int,
pub _pad: [::c_int; 29],
_align: [usize; 0],
}
pub struct ipc_perm {
pub __ipc_perm_key: ::key_t,
pub uid: ::uid_t,
@ -78,10 +70,8 @@ s! {
pub const BUFSIZ: ::c_uint = 1024;
pub const TMP_MAX: ::c_uint = 10000;
pub const FOPEN_MAX: ::c_uint = 1000;
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
pub const O_ACCMODE: ::c_int = 0o10000003;
pub const O_NDELAY: ::c_int = O_NONBLOCK;
pub const RUSAGE_CHILDREN: ::c_int = 1;
pub const NI_MAXHOST: ::socklen_t = 255;
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
@ -154,9 +144,7 @@ pub const MADV_DONTDUMP: ::c_int = 16;
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
pub const POLLRDNORM: ::c_short = 0x040;
pub const POLLWRNORM: ::c_short = 0x100;
pub const POLLRDBAND: ::c_short = 0x080;
pub const POLLWRBAND: ::c_short = 0x200;
pub const MADV_HUGEPAGE: ::c_int = 14;
pub const MADV_NOHUGEPAGE: ::c_int = 15;