3 RUN apt-get update && apt-get install -y --no-install-recommends \
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 && \
30 COPY scripts/sccache.sh /scripts/
31 RUN sh /scripts/sccache.sh
33 COPY scripts/cmake.sh /scripts/
36 ENV RUST_CONFIGURE_ARGS \
37 --musl-root-i586=/musl-i586 \
38 --musl-root-i686=/musl-i686 \
40 --set llvm.allow-old-toolchain
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.
46 # See: https://github.com/rust-lang/rust/issues/34978
47 ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
48 ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
49 ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
51 ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
54 python3 ../x.py --stage 2 test --host='' --target $TARGETS && \
55 python3 ../x.py dist --host='' --target $TARGETS,i586-unknown-linux-musl