diff --git a/.travis.yml b/.travis.yml index 10ef76c65a494d33a21f73784b7820fcb006cfd9..333fb22562264d172223fb44db3d51a48a48b6f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,7 +34,7 @@ matrix: env: TARGET=arm-unknown-linux-gnueabihf rust: nightly - os: linux - env: TARGET=mips-unknown-linux-gnu DOCKER=plhk/ubuntu-cross-mips:latest + env: TARGET=mips-unknown-linux-gnu DOCKER=alexcrichton/rust-libc-mips:2016-01-10 rust: nightly - os: linux env: TARGET=aarch64-unknown-linux-gnu diff --git a/ci/cargo-config b/ci/cargo-config index e738f18902dc0ee6d076ae40f6820223ccd760a8..41e232e5460620e382928055ea8c86df510da320 100644 --- a/ci/cargo-config +++ b/ci/cargo-config @@ -7,7 +7,7 @@ linker = "arm-linux-androideabi-gcc" linker = "arm-linux-gnueabihf-gcc-4.7" [target.mips-unknown-linux-gnu] -linker = "mips-linux-gnu-gcc" +linker = "mips-linux-gnu-gcc-5" [target.aarch64-unknown-linux-gnu] linker = "aarch64-linux-gnu-gcc" diff --git a/ci/mips/Dockerfile b/ci/mips/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..6da6f684c0ddb61b5098020c09fc3e096e7709d7 --- /dev/null +++ b/ci/mips/Dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:15.10 + +RUN apt-get update +RUN apt-get install -y --force-yes --no-install-recommends \ + software-properties-common +RUN add-apt-repository ppa:angelsl/mips-cross +RUN apt-get update +RUN apt-get install -y --force-yes --no-install-recommends \ + gcc-5-mips-linux-gnu libc6-dev-mips-cross \ + gcc-5-mipsel-linux-gnu libc6-dev-mipsel-cross +RUN apt-get install -y --force-yes --no-install-recommends \ + build-essential qemu-user diff --git a/ci/run-travis.sh b/ci/run-travis.sh index b7a50b77c06cc00ad1d5102c67a5254b64d572e2..75ce8ba1d8f478d0fa8ce06f91a8ce2876d8169d 100644 --- a/ci/run-travis.sh +++ b/ci/run-travis.sh @@ -37,8 +37,8 @@ if [ "$TRAVIS" = "true" ]; then ;; *) - # Download the rustlib folder from the relevant portion of main distribution's - # tarballs. + # Download the rustlib folder from the relevant portion of main + # distribution's tarballs. dir=rust-std-$TARGET pkg=rust-std if [ "$TRAVIS_RUST_VERSION" = "1.0.0" ]; then @@ -58,12 +58,24 @@ fi # travis has (sharing it via `-v`) and otherwise the tests run entirely within # the container. if [ "$DOCKER" != "" ]; then + args="" + + case "$TARGET" in + mips-unknown-linux-gnu) + args="$args -e CC=mips-linux-gnu-gcc-5" + ;; + + *) + ;; + esac + exec docker run \ --entrypoint bash \ -v `rustc --print sysroot`:/usr/local:ro \ -v `pwd`:/checkout \ -e LD_LIBRARY_PATH=/usr/local/lib \ -e CARGO_TARGET_DIR=/tmp \ + $args \ -w /checkout \ -it $DOCKER \ ci/run.sh $TARGET @@ -88,19 +100,6 @@ case "$TARGET" in *-apple-ios) ;; - mips-unknown-linux-gnu) - # Download pre-built and custom MIPS libs and then also instsall the MIPS - # compiler according to this post: - # http://sathisharada.blogspot.com/2014_10_01_archive.html - echo 'deb http://ftp.de.debian.org/debian squeeze main' | \ - sudo tee -a /etc/apt/sources.list - echo 'deb http://www.emdebian.org/debian/ squeeze main' | \ - sudo tee -a /etc/apt/sources.list - install emdebian-archive-keyring - install qemu-user gcc-4.4-mips-linux-gnu -y --force-yes - export CC=mips-linux-gnu-gcc - ;; - *) # clang has better error messages and implements alignof more broadly export CC=clang