]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-i586-gnu-i586-i686-musl/Dockerfile
Auto merge of #47251 - rkruppe:rm-simd-attr, r=eddyb
[rust.git] / src / ci / docker / dist-i586-gnu-i586-i686-musl / Dockerfile
1 FROM ubuntu:16.04
2
3 RUN apt-get update && apt-get install -y --no-install-recommends \
4   g++-multilib \
5   make \
6   file \
7   curl \
8   ca-certificates \
9   python2.7 \
10   git \
11   cmake \
12   xz-utils \
13   sudo \
14   gdb \
15   patch \
16   libssl-dev \
17   pkg-config
18
19 WORKDIR /build/
20 COPY scripts/musl.sh /build/
21 RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \
22     CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \
23     bash musl.sh i686 --target=i686 && \
24     CC=gcc CFLAGS="-march=pentium -m32 -fPIC -Wa,-mrelax-relocations=no" \
25     CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
26     bash musl.sh i586 --target=i586 && \
27     rm -rf /build
28
29 COPY scripts/sccache.sh /scripts/
30 RUN sh /scripts/sccache.sh
31
32 ENV RUST_CONFIGURE_ARGS \
33       --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
34       --musl-root-i586=/musl-i586 \
35       --musl-root-i686=/musl-i686 \
36       --enable-extended
37
38 # Newer binutils broke things on some vms/distros (i.e., linking against
39 # unknown relocs disabled by the following flag), so we need to go out of our
40 # way to produce "super compatible" binaries.
41 #
42 # See: https://github.com/rust-lang/rust/issues/34978
43 ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
44 ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
45 # FIXME remove -Wl,-melf_i386 after cc is updated to include
46 #       https://github.com/alexcrichton/cc-rs/pull/281
47 ENV CFLAGS_i586_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wl,-melf_i386"
48
49 ENV TARGETS=i586-unknown-linux-gnu
50 ENV TARGETS=$TARGETS,i686-unknown-linux-musl
51
52 ENV SCRIPT \
53       python2.7 ../x.py test --target $TARGETS && \
54       python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl