]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/host-x86_64/dist-i586-gnu-i586-i686-musl/Dockerfile
New upstream version 1.65.0+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 32
6a06907d
XL
33COPY scripts/cmake.sh /scripts/
34RUN /scripts/cmake.sh
35
476ff2be 36ENV RUST_CONFIGURE_ARGS \
2c00a5a8 37 --musl-root-i586=/musl-i586 \
cc61c64b 38 --musl-root-i686=/musl-i686 \
f2b60f7d
FG
39 --disable-docs \
40 --set llvm.allow-old-toolchain
476ff2be 41
8bb4bdeb
XL
42# Newer binutils broke things on some vms/distros (i.e., linking against
43# unknown relocs disabled by the following flag), so we need to go out of our
44# way to produce "super compatible" binaries.
45#
46# See: https://github.com/rust-lang/rust/issues/34978
47ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
abe05a73 48ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
8faf50e0 49ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
2c00a5a8 50
0531ce1d 51ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
8bb4bdeb 52
32a655c1 53ENV SCRIPT \
1b1a35ee
XL
54 python3 ../x.py --stage 2 test --host='' --target $TARGETS && \
55 python3 ../x.py dist --host='' --target $TARGETS,i586-unknown-linux-musl