Skip to content

Commit

Permalink
Auto merge of rust-lang#391 - japaric:mips-musl, r=alexcrichton
Browse files Browse the repository at this point in the history
add CI for mips-musl

and fix the statvfs struct for this target

r? @alexcrichton

I didn't really test the CI part but this target now passes libc-test under QEMU
  • Loading branch information
bors committed Sep 30, 2016
2 parents 84fbc43 + c0fd46f commit 0e0ab04
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
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=mips-unknown-linux-musl
rust: stable
- os: linux
env: TARGET=mipsel-unknown-linux-musl
rust: stable
Expand Down
14 changes: 14 additions & 0 deletions ci/docker/mips-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/ar71xx/generic/OpenWrt-SDK-ar71xx-generic_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
tar xjf - -C /toolchain --strip-components=1

ENV PATH=$PATH:/rust/bin:/toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15/bin \
CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
CARGO_TARGET_MIPS_UNKNOWN_LINUX_MUSL_LINKER=mips-openwrt-linux-gcc
9 changes: 7 additions & 2 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,15 @@ 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
mips-unknown-linux-musl)
qemu-mips -L /toolchain/staging_dir/toolchain-mips_34kc_gcc-5.3.0_musl-1.1.15 \
$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
5 changes: 4 additions & 1 deletion src/unix/notbsd/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,12 @@ s! {
pub f_files: ::fsfilcnt_t,
pub f_ffree: ::fsfilcnt_t,
pub f_favail: ::fsfilcnt_t,
#[cfg(target_endian = "little")]
pub f_fsid: ::c_ulong,
#[cfg(target_pointer_width = "32")]
pub __f_unused: ::c_int,
__f_unused: ::c_int,
#[cfg(target_endian = "big")]
pub f_fsid: ::c_ulong,
pub f_flag: ::c_ulong,
pub f_namemax: ::c_ulong,
__f_spare: [::c_int; 6],
Expand Down

0 comments on commit 0e0ab04

Please sign in to comment.