fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.4 KiB50 linesraw
1FROM ubuntu:16.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4  g++-multilib \
5  make \
6  file \
7  curl \
8  ca-certificates \
9  python2.7 \
10  git \
11  cmake \
12  xz-utils \
13  sudo \
14  gdb \
15  patch \
16  libssl-dev \
17  pkg-config
18
19WORKDIR /build/
20COPY scripts/musl.sh /build/
21RUN 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 && \
27    rm -rf /build
28
29COPY scripts/sccache.sh /scripts/
30RUN sh /scripts/sccache.sh
31
32ENV RUST_CONFIGURE_ARGS \
33      --musl-root-i586=/musl-i586 \
34      --musl-root-i686=/musl-i686 \
35      --disable-docs
36
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.
40#
41# See: https://github.com/rust-lang/rust/issues/34978
42ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
43ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
44ENV CFLAGS_i586_unknown_linux_musl=-Wa,-mrelax-relocations=no
45
46ENV TARGETS=i586-unknown-linux-gnu,i686-unknown-linux-musl
47
48ENV SCRIPT \
49      python2.7 ../x.py test --target $TARGETS && \
50      python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl