]> git.proxmox.com Git - rustc.git/blob - src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / ci / docker / host-x86_64 / 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 ninja-build \
7 file \
8 curl \
9 ca-certificates \
10 python3 \
11 git \
12 cmake \
13 xz-utils \
14 sudo \
15 gdb \
16 patch \
17 libssl-dev \
18 pkg-config
19
20 WORKDIR /build/
21 COPY scripts/musl.sh /build/
22 RUN CC=gcc CFLAGS="-m32 -Wa,-mrelax-relocations=no" \
23 CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \
24 bash musl.sh i686 --target=i686 && \
25 CC=gcc CFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
26 CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
27 bash musl.sh i586 --target=i586 && \
28 rm -rf /build
29
30 COPY scripts/sccache.sh /scripts/
31 RUN sh /scripts/sccache.sh
32
33 COPY scripts/cmake.sh /scripts/
34 RUN /scripts/cmake.sh
35
36 ENV RUST_CONFIGURE_ARGS \
37 --musl-root-i586=/musl-i586 \
38 --musl-root-i686=/musl-i686 \
39 --disable-docs
40
41 # Newer binutils broke things on some vms/distros (i.e., linking against
42 # unknown relocs disabled by the following flag), so we need to go out of our
43 # way to produce "super compatible" binaries.
44 #
45 # See: https://github.com/rust-lang/rust/issues/34978
46 ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
47 ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
48 ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
49
50 ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
51
52 ENV SCRIPT \
53 python3 ../x.py --stage 2 test --host='' --target $TARGETS && \
54 python3 ../x.py dist --host='' --target $TARGETS,i586-unknown-linux-musl