]> git.lizzy.rs Git - rust.git/blob - src/ci/docker/dist-x86-linux/Dockerfile
Unignore u128 test for stage 0,1
[rust.git] / src / ci / docker / dist-x86-linux / Dockerfile
1 FROM centos:5
2
3 WORKDIR /build
4
5 RUN yum upgrade -y && yum install -y \
6       curl \
7       bzip2 \
8       gcc \
9       make \
10       glibc-devel \
11       perl \
12       zlib-devel \
13       file \
14       xz \
15       which \
16       pkg-config \
17       wget \
18       autoconf \
19       gettext
20
21 ENV PATH=/rustroot/bin:$PATH
22 ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
23 WORKDIR /tmp
24
25 # binutils < 2.22 has a bug where the 32-bit executables it generates
26 # immediately segfault in Rust, so we need to install our own binutils.
27 #
28 # See https://github.com/rust-lang/rust/issues/20440 for more info
29 COPY shared.sh build-binutils.sh /tmp/
30 RUN ./build-binutils.sh
31
32 # Need a newer version of gcc than centos has to compile LLVM nowadays
33 COPY build-gcc.sh /tmp/
34 RUN ./build-gcc.sh
35
36 # We need a build of openssl which supports SNI to download artifacts from
37 # static.rust-lang.org. This'll be used to link into libcurl below (and used
38 # later as well), so build a copy of OpenSSL with dynamic libraries into our
39 # generic root.
40 COPY build-openssl.sh /tmp/
41 RUN ./build-openssl.sh
42
43 # The `curl` binary on CentOS doesn't support SNI which is needed for fetching
44 # some https urls we have, so install a new version of libcurl + curl which is
45 # using the openssl we just built previously.
46 #
47 # Note that we also disable a bunch of optional features of curl that we don't
48 # really need.
49 COPY build-curl.sh /tmp/
50 RUN ./build-curl.sh
51
52 # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
53 COPY build-python.sh /tmp/
54 RUN ./build-python.sh
55
56 # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
57 # cloning, so download and build it here.
58 COPY build-git.sh /tmp/
59 RUN ./build-git.sh
60
61 # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
62 # only has 2.6.4, so build our own
63 COPY build-cmake.sh /tmp/
64 RUN ./build-cmake.sh
65
66 RUN curl -Lo /rustroot/dumb-init \
67       https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
68       chmod +x /rustroot/dumb-init
69 ENTRYPOINT ["/rustroot/dumb-init", "--"]
70
71 ENV SCCACHE_DIGEST=7237e38e029342fa27b7ac25412cb9d52554008b12389727320bd533fd7f05b6a96d55485f305caf95e5c8f5f97c3313e10012ccad3e752aba2518f3522ba783
72 RUN curl -L https://api.pub.build.mozilla.org/tooltool/sha512/$SCCACHE_DIGEST | \
73       xz --decompress | \
74       tar xf - -C /usr/local/bin --strip-components=1
75
76 ENV HOSTS=i686-unknown-linux-gnu
77 ENV HOSTS=$HOSTS,x86_64-unknown-linux-gnu
78
79 ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
80 ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS