]>
Commit | Line | Data |
---|---|---|
476ff2be SL |
1 | FROM ubuntu:16.04 |
2 | ||
3 | RUN 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 |
24 | RUN 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 | |
28 | RUN 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 | |
31 | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | |
32 | ||
32a655c1 | 33 | WORKDIR /tmp |
476ff2be | 34 | |
32a655c1 SL |
35 | COPY build-rumprun.sh /tmp/ |
36 | RUN ./build-rumprun.sh | |
476ff2be | 37 | |
32a655c1 SL |
38 | COPY build-arm-musl.sh /tmp/ |
39 | RUN ./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 | |
43 | RUN mkdir /usr/local/mips-linux-musl | |
44 | RUN 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 | |
46 | RUN 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 | |
52 | RUN mkdir /usr/local/mipsel-linux-musl | |
53 | RUN 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 | |
55 | RUN 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 | ||
59 | ENV TARGETS=asmjs-unknown-emscripten | |
60 | ENV TARGETS=$TARGETS,wasm32-unknown-emscripten | |
61 | ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd | |
62 | ENV TARGETS=$TARGETS,mips-unknown-linux-musl | |
63 | ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl | |
64 | ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi | |
65 | ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf | |
66 | ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf | |
8bb4bdeb | 67 | ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu |
476ff2be | 68 | |
32a655c1 | 69 | ENV 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 | |
74 | ENV STAGING_DIR=/tmp | |
75 | ||
76 | ENV 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 | |
81 | ENV SCRIPT python2.7 ../x.py dist --target $TARGETS |