]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/dist-i686-linux/Dockerfile
New upstream version 1.25.0+dfsg1
[rustc.git] / src / ci / docker / dist-i686-linux / Dockerfile
CommitLineData
32a655c1
SL
1FROM centos:5
2
3WORKDIR /build
4
8bb4bdeb
XL
5# Centos 5 is EOL and is no longer available from the usual mirrors, so switch
6# to http://vault.centos.org/
7RUN sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
8RUN sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
9RUN sed -i 's|#\(baseurl.*\)mirror.centos.org/centos/$releasever|\1vault.centos.org/5.11|' /etc/yum.repos.d/*.repo
10
32a655c1
SL
11RUN yum upgrade -y && yum install -y \
12 curl \
13 bzip2 \
14 gcc \
cc61c64b 15 gcc-c++ \
32a655c1
SL
16 make \
17 glibc-devel \
18 perl \
19 zlib-devel \
20 file \
21 xz \
22 which \
8bb4bdeb 23 pkgconfig \
32a655c1
SL
24 wget \
25 autoconf \
26 gettext
27
28ENV PATH=/rustroot/bin:$PATH
29ENV LD_LIBRARY_PATH=/rustroot/lib64:/rustroot/lib
8bb4bdeb 30ENV PKG_CONFIG_PATH=/rustroot/lib/pkgconfig
32a655c1 31WORKDIR /tmp
7cac9316 32COPY dist-i686-linux/shared.sh dist-i686-linux/build-binutils.sh /tmp/
32a655c1
SL
33
34# We need a build of openssl which supports SNI to download artifacts from
35# static.rust-lang.org. This'll be used to link into libcurl below (and used
36# later as well), so build a copy of OpenSSL with dynamic libraries into our
37# generic root.
7cac9316 38COPY dist-i686-linux/build-openssl.sh /tmp/
32a655c1
SL
39RUN ./build-openssl.sh
40
41# The `curl` binary on CentOS doesn't support SNI which is needed for fetching
42# some https urls we have, so install a new version of libcurl + curl which is
43# using the openssl we just built previously.
44#
45# Note that we also disable a bunch of optional features of curl that we don't
46# really need.
7cac9316 47COPY dist-i686-linux/build-curl.sh /tmp/
32a655c1
SL
48RUN ./build-curl.sh
49
8bb4bdeb
XL
50# binutils < 2.22 has a bug where the 32-bit executables it generates
51# immediately segfault in Rust, so we need to install our own binutils.
52#
53# See https://github.com/rust-lang/rust/issues/20440 for more info
54RUN ./build-binutils.sh
55
56# Need a newer version of gcc than centos has to compile LLVM nowadays
7cac9316 57COPY dist-i686-linux/build-gcc.sh /tmp/
8bb4bdeb
XL
58RUN ./build-gcc.sh
59
32a655c1 60# CentOS 5.5 has Python 2.4 by default, but LLVM needs 2.7+
7cac9316 61COPY dist-i686-linux/build-python.sh /tmp/
32a655c1
SL
62RUN ./build-python.sh
63
64# Apparently CentOS 5.5 desn't have `git` in yum, but we're gonna need it for
65# cloning, so download and build it here.
7cac9316 66COPY dist-i686-linux/build-git.sh /tmp/
32a655c1
SL
67RUN ./build-git.sh
68
69# libssh2 (a dependency of Cargo) requires cmake 2.8.11 or higher but CentOS
70# only has 2.6.4, so build our own
7cac9316 71COPY dist-i686-linux/build-cmake.sh /tmp/
32a655c1
SL
72RUN ./build-cmake.sh
73
8bb4bdeb
XL
74# for sanitizers, we need kernel headers files newer than the ones CentOS ships
75# with so we install newer ones here
7cac9316 76COPY dist-i686-linux/build-headers.sh /tmp/
8bb4bdeb
XL
77RUN ./build-headers.sh
78
041b39d2
XL
79COPY scripts/sccache.sh /scripts/
80RUN sh /scripts/sccache.sh
32a655c1
SL
81
82ENV HOSTS=i686-unknown-linux-gnu
32a655c1 83
8bb4bdeb
XL
84ENV RUST_CONFIGURE_ARGS \
85 --host=$HOSTS \
86 --enable-extended \
041b39d2 87 --enable-sanitizers \
2c00a5a8
XL
88 --enable-profiler \
89 --enable-emscripten \
90 --build=i686-unknown-linux-gnu
32a655c1 91ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
8bb4bdeb
XL
92
93# This is the only builder which will create source tarballs
94ENV DIST_SRC 1
95
96# When we build cargo in this container, we don't want it to use the system
97# libcurl, instead it should compile its own.
98ENV LIBCURL_NO_PKG_CONFIG 1