]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / ci / docker / host-x86_64 / dist-i586-gnu-i586-i686-musl / Dockerfile
CommitLineData
476ff2be
SL
1FROM ubuntu:16.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
32a655c1 4 g++-multilib \
476ff2be 5 make \
1b1a35ee 6 ninja-build \
476ff2be
SL
7 file \
8 curl \
9 ca-certificates \
ba9703b0 10 python3 \
476ff2be
SL
11 git \
12 cmake \
476ff2be
SL
13 xz-utils \
14 sudo \
32a655c1 15 gdb \
8bb4bdeb
XL
16 patch \
17 libssl-dev \
18 pkg-config
476ff2be
SL
19
20WORKDIR /build/
2c00a5a8
XL
21COPY scripts/musl.sh /build/
22RUN 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
476ff2be 29
041b39d2
XL
30COPY scripts/sccache.sh /scripts/
31RUN sh /scripts/sccache.sh
476ff2be
SL
32
33ENV RUST_CONFIGURE_ARGS \
2c00a5a8 34 --musl-root-i586=/musl-i586 \
cc61c64b 35 --musl-root-i686=/musl-i686 \
0531ce1d 36 --disable-docs
476ff2be 37
8bb4bdeb
XL
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
43ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
abe05a73 44ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
8faf50e0 45ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
2c00a5a8 46
0531ce1d 47ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
8bb4bdeb 48
32a655c1 49ENV SCRIPT \
1b1a35ee
XL
50 python3 ../x.py --stage 2 test --host='' --target $TARGETS && \
51 python3 ../x.py dist --host='' --target $TARGETS,i586-unknown-linux-musl