]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/cross/Dockerfile
New upstream version 1.17.0+dfsg1
[rustc.git] / src / ci / docker / cross / Dockerfile
CommitLineData
476ff2be
SL
1FROM ubuntu:16.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4 g++ \
5 make \
6 file \
7 curl \
8 ca-certificates \
9 python2.7 \
10 git \
11 cmake \
476ff2be 12 sudo \
32a655c1
SL
13 xz-utils \
14 zlib1g-dev \
15 g++-arm-linux-gnueabi \
16 g++-arm-linux-gnueabihf \
8bb4bdeb
XL
17 gcc-sparc64-linux-gnu \
18 libc6-dev-sparc64-cross \
32a655c1 19 bzip2 \
8bb4bdeb
XL
20 patch \
21 libssl-dev \
22 pkg-config
476ff2be 23
8bb4bdeb
XL
24RUN curl -o /usr/local/bin/sccache \
25 https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-04-sccache-x86_64-unknown-linux-musl && \
26 chmod +x /usr/local/bin/sccache
476ff2be
SL
27
28RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
29 dpkg -i dumb-init_*.deb && \
30 rm dumb-init_*.deb
31ENTRYPOINT ["/usr/bin/dumb-init", "--"]
32
32a655c1 33WORKDIR /tmp
476ff2be 34
32a655c1
SL
35COPY build-rumprun.sh /tmp/
36RUN ./build-rumprun.sh
476ff2be 37
32a655c1
SL
38COPY build-arm-musl.sh /tmp/
39RUN ./build-arm-musl.sh
476ff2be 40
32a655c1
SL
41# originally from
42# https://downloads.openwrt.org/snapshots/trunk/ar71xx/generic/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2
43RUN mkdir /usr/local/mips-linux-musl
44RUN curl -L https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/OpenWrt-Toolchain-ar71xx-generic_gcc-5.3.0_musl-1.1.16.Linux-x86_64.tar.bz2 | \
45 tar xjf - -C /usr/local/mips-linux-musl --strip-components=2
46RUN for file in /usr/local/mips-linux-musl/bin/mips-openwrt-linux-*; do \
47 ln -s $file /usr/local/bin/`basename $file`; \
48 done
476ff2be 49
32a655c1
SL
50# Note that this originally came from:
51# 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
52RUN mkdir /usr/local/mipsel-linux-musl
53RUN curl -L https://s3.amazonaws.com/rust-lang-ci/libc/OpenWrt-Toolchain-malta-le_gcc-5.3.0_musl-1.1.15.Linux-x86_64.tar.bz2 | \
54 tar xjf - -C /usr/local/mipsel-linux-musl --strip-components=2
55RUN for file in /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-*; do \
56 ln -s $file /usr/local/bin/`basename $file`; \
57 done
58
59ENV TARGETS=asmjs-unknown-emscripten
60ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
61ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
62ENV TARGETS=$TARGETS,mips-unknown-linux-musl
63ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl
64ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
65ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
66ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
8bb4bdeb 67ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
476ff2be 68
32a655c1 69ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
8bb4bdeb
XL
70 CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
71 CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc
32a655c1
SL
72
73# Suppress some warnings in the openwrt toolchains we downloaded
74ENV STAGING_DIR=/tmp
75
76ENV RUST_CONFIGURE_ARGS \
77 --target=$TARGETS \
78 --musl-root-arm=/usr/local/arm-linux-musleabi \
79 --musl-root-armhf=/usr/local/arm-linux-musleabihf \
80 --musl-root-armv7=/usr/local/armv7-linux-musleabihf
81ENV SCRIPT python2.7 ../x.py dist --target $TARGETS