3 RUN apt-get update && apt-get install -y --no-install-recommends \
20 COPY scripts/musl.sh /build/
21 RUN CC=gcc CFLAGS="-m32 -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 -Wa,-mrelax-relocations=no" \
25 CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
26 bash musl.sh i586 --target=i586 && \
29 COPY scripts/sccache.sh /scripts/
30 RUN sh /scripts/sccache.sh
32 ENV RUST_CONFIGURE_ARGS \
33 --musl-root-i586=/musl-i586 \
34 --musl-root-i686=/musl-i686 \
37 # Newer binutils broke things on some vms/distros (i.e., linking against
38 # unknown relocs disabled by the following flag), so we need to go out of our
39 # way to produce "super compatible" binaries.
41 # See: https://github.com/rust-lang/rust/issues/34978
42 ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
43 ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
44 ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
46 ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
49 python3 ../x.py test --target $TARGETS && \
50 python3 ../x.py dist --target $TARGETS,i586-unknown-linux-musl