Move docker container and don't re-symlink mips compilers

This commit is contained in:
Alex Crichton 2016-01-10 14:36:27 -08:00
parent 4506d29557
commit a5d830a8a0
4 changed files with 28 additions and 17 deletions

View File

@ -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

View File

@ -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"

12
ci/mips/Dockerfile Normal file
View File

@ -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

View File

@ -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