Skip to content

Add CI for mipsel-unknown-linux-musl #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions ci/docker/mipsel-unknown-linux-musl/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
13 changes: 13 additions & 0 deletions src/unix/notbsd/linux/musl/b32/arm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
13 changes: 13 additions & 0 deletions src/unix/notbsd/linux/musl/b32/asmjs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
15 changes: 14 additions & 1 deletion src/unix/notbsd/linux/musl/b32/mips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
13 changes: 13 additions & 0 deletions src/unix/notbsd/linux/musl/b32/x86.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
13 changes: 13 additions & 0 deletions src/unix/notbsd/linux/musl/b64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
12 changes: 0 additions & 12 deletions src/unix/notbsd/linux/musl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down