]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-various-1/Dockerfile
Hide some lints which are not quite right the way they are reported to the user
[rust.git] / src / ci / docker / dist-various-1 / Dockerfile
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 \
12   sudo \
13   xz-utils \
14   zlib1g-dev \
15   g++-arm-linux-gnueabi \
16   g++-arm-linux-gnueabihf \
17   g++-aarch64-linux-gnu \
18   gcc-sparc64-linux-gnu \
19   libc6-dev-sparc64-cross \
20   bzip2 \
21   patch \
22   libssl-dev \
23   pkg-config \
24   gcc-arm-none-eabi \
25   libnewlib-arm-none-eabi
26
27 WORKDIR /build
28
29 COPY dist-various-1/build-rumprun.sh /build
30 RUN ./build-rumprun.sh
31
32 COPY dist-various-1/install-x86_64-redox.sh /build
33 RUN ./install-x86_64-redox.sh
34
35 COPY dist-various-1/install-mips-musl.sh /build
36 RUN ./install-mips-musl.sh
37
38 COPY dist-various-1/install-mipsel-musl.sh /build
39 RUN ./install-mipsel-musl.sh
40
41 # Suppress some warnings in the openwrt toolchains we downloaded
42 ENV STAGING_DIR=/tmp
43
44 COPY scripts/musl.sh /build
45 RUN env \
46     CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
47     CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv5te -marm -mfloat-abi=soft" \
48     bash musl.sh armv5te && \
49     env \
50     CC=arm-linux-gnueabi-gcc CFLAGS="-march=armv6 -marm" \
51     CXX=arm-linux-gnueabi-g++ CXXFLAGS="-march=armv6 -marm" \
52     bash musl.sh arm && \
53     env \
54     CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv6 -marm" \
55     CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv6 -marm" \
56     bash musl.sh armhf && \
57     env \
58     CC=arm-linux-gnueabihf-gcc CFLAGS="-march=armv7-a" \
59     CXX=arm-linux-gnueabihf-g++ CXXFLAGS="-march=armv7-a" \
60     bash musl.sh armv7 && \
61     env \
62     CC=aarch64-linux-gnu-gcc \
63     CXX=aarch64-linux-gnu-g++ \
64     bash musl.sh aarch64 && \
65     env \
66     CC=mips-openwrt-linux-gcc \
67     CXX=mips-openwrt-linux-g++ \
68     bash musl.sh mips && \
69     env \
70     CC=mipsel-openwrt-linux-gcc \
71     CXX=mipsel-openwrt-linux-g++ \
72     bash musl.sh mipsel && \
73     rm -rf /build/*
74
75 # FIXME(mozilla/sccache#235) this shouldn't be necessary but is currently
76 # necessary to disambiguate the mips compiler with the mipsel compiler. We want
77 # to give these two wrapper scripts (currently identical ones) different hashes
78 # to ensure that sccache understands that they're different compilers.
79 RUN \
80   echo "# a" >> /usr/local/mips-linux-musl/bin/mips-openwrt-linux-musl-wrapper.sh && \
81   echo "# b" >> /usr/local/mipsel-linux-musl/bin/mipsel-openwrt-linux-musl-wrapper.sh
82
83 ENV RUN_MAKE_TARGETS=thumbv6m-none-eabi
84 ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7m-none-eabi
85 ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7em-none-eabi
86 ENV RUN_MAKE_TARGETS=$RUN_MAKE_TARGETS,thumbv7em-none-eabihf
87
88 ENV TARGETS=asmjs-unknown-emscripten
89 ENV TARGETS=$TARGETS,wasm32-unknown-emscripten
90 ENV TARGETS=$TARGETS,x86_64-rumprun-netbsd
91 ENV TARGETS=$TARGETS,mips-unknown-linux-musl
92 ENV TARGETS=$TARGETS,mipsel-unknown-linux-musl
93 ENV TARGETS=$TARGETS,arm-unknown-linux-musleabi
94 ENV TARGETS=$TARGETS,arm-unknown-linux-musleabihf
95 ENV TARGETS=$TARGETS,armv5te-unknown-linux-gnueabi
96 ENV TARGETS=$TARGETS,armv5te-unknown-linux-musleabi
97 ENV TARGETS=$TARGETS,armv7-unknown-linux-musleabihf
98 ENV TARGETS=$TARGETS,aarch64-unknown-linux-musl
99 ENV TARGETS=$TARGETS,sparc64-unknown-linux-gnu
100 ENV TARGETS=$TARGETS,x86_64-unknown-redox
101 ENV TARGETS=$TARGETS,thumbv6m-none-eabi
102 ENV TARGETS=$TARGETS,thumbv7m-none-eabi
103 ENV TARGETS=$TARGETS,thumbv7em-none-eabi
104 ENV TARGETS=$TARGETS,thumbv7em-none-eabihf
105
106 # FIXME: remove armv5te vars after https://github.com/alexcrichton/cc-rs/issues/271
107 #        get fixed and cc update
108 ENV CC_mipsel_unknown_linux_musl=mipsel-openwrt-linux-gcc \
109     CC_mips_unknown_linux_musl=mips-openwrt-linux-gcc \
110     CC_sparc64_unknown_linux_gnu=sparc64-linux-gnu-gcc \
111     CC_x86_64_unknown_redox=x86_64-unknown-redox-gcc \
112     CC_armv5te_unknown_linux_gnueabi=arm-linux-gnueabi-gcc \
113     CFLAGS_armv5te_unknown_linux_gnueabi="-march=armv5te -marm -mfloat-abi=soft" \
114     CC_armv5te_unknown_linux_musleabi=arm-linux-gnueabi-gcc \
115     CFLAGS_armv5te_unknown_linux_musleabi="-march=armv5te -marm -mfloat-abi=soft"
116
117 ENV RUST_CONFIGURE_ARGS \
118       --musl-root-armv5te=/musl-armv5te \
119       --musl-root-arm=/musl-arm \
120       --musl-root-armhf=/musl-armhf \
121       --musl-root-armv7=/musl-armv7 \
122       --musl-root-aarch64=/musl-aarch64 \
123       --musl-root-mips=/musl-mips \
124       --musl-root-mipsel=/musl-mipsel \
125       --enable-emscripten \
126       --disable-docs
127
128 ENV SCRIPT \ 
129       python2.7 ../x.py test --target $RUN_MAKE_TARGETS src/test/run-make && \
130       python2.7 ../x.py dist --target $TARGETS
131
132 # sccache
133 COPY scripts/sccache.sh /scripts/
134 RUN sh /scripts/sccache.sh