5 RUN yum upgrade -y && yum install -y \
22 ENV PATH=/rustroot/bin:$PATH
23 ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
24 ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
26 COPY shared.sh build-binutils.sh /tmp/
28 # We need a build of openssl which supports SNI to download artifacts from
29 # static.rust-lang.org. This'll be used to link into libcurl below (and used
30 # later as well), so build a copy of OpenSSL with dynamic libraries into our
32 COPY build-openssl.sh /tmp/
33 RUN ./build-openssl.sh
35 # The `curl` binary on CentOS doesn't support SNI which is needed for fetching
36 # some https urls we have, so install a new version of libcurl + curl which is
37 # using the openssl we just built previously.
39 # Note that we also disable a bunch of optional features of curl that we don't
41 COPY build-curl.sh /tmp/
44 # binutils < 2.22 has a bug where the 32-bit executables it generates
45 # immediately segfault in Rust, so we need to install our own binutils.
47 # See https://github.com/rust-lang/rust/issues/20440 for more info
48 RUN ./build-binutils.sh
50 # Need a newer version of gcc than centos has to compile LLVM nowadays
51 COPY build-gcc.sh /tmp/
54 # CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
55 COPY build-python.sh /tmp/
58 # Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
59 # cloning, so download and build it here.
60 COPY build-git.sh /tmp/
63 # libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
64 # only has 2.6.4, so build our own
65 COPY build-cmake.sh /tmp/
68 # for sanitizers, we need kernel headers files newer than the ones CentOS ships
69 # with so we install newer ones here
70 COPY build-headers.sh /tmp/
71 RUN ./build-headers.sh
73 RUN curl -Lo /rustroot/dumb-init \
74 https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 && \
75 chmod +x /rustroot/dumb-init
76 ENTRYPOINT ["/rustroot/dumb-init", "--"]
78 RUN curl -o /usr/local/bin/sccache \
79 https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-03-22-sccache-x86_64-unknown-linux-musl && \
80 chmod +x /usr/local/bin/sccache
82 ENV HOSTS=i686-unknown-linux-gnu
83 ENV HOSTS=$HOSTS,x86_64-unknown-linux-gnu
85 ENV RUST_CONFIGURE_ARGS \
89 ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
91 # This is the only builder which will create source tarballs
94 # When we build cargo in this container, we don't want it to use the system
95 # libcurl, instead it should compile its own.
96 ENV LIBCURL_NO_PKG_CONFIG 1