3 RUN apt-get update && apt-get install -y --no-install-recommends \
20 COPY scripts/musl.sh /build/
21 RUN CC=gcc CFLAGS="-m32 -fPIC -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 -fPIC -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 --target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
34 --musl-root-i586=/musl-i586 \
35 --musl-root-i686=/musl-i686 \
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.
42 # See: https://github.com/rust-lang/rust/issues/34978
43 ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
44 ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
45 # FIXME remove -Wl,-melf_i386 after cc is updated to include
46 # https://github.com/alexcrichton/cc-rs/pull/281
47 ENV CFLAGS_i586_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wl,-melf_i386"
49 ENV TARGETS=i586-unknown-linux-gnu
50 ENV TARGETS=$TARGETS,i686-unknown-linux-musl
53 python2.7 ../x.py test --target $TARGETS && \
54 python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl