]> git.proxmox.com Git - rustc.git/blame - src/ci/docker/dist-powerpc-linux/Dockerfile
New upstream version 1.17.0+dfsg1
[rustc.git] / src / ci / docker / dist-powerpc-linux / Dockerfile
CommitLineData
32a655c1
SL
1FROM ubuntu:16.04
2
3RUN apt-get update && apt-get install -y --no-install-recommends \
4 automake \
5 bison \
6 bzip2 \
7 ca-certificates \
8 cmake \
9 curl \
10 file \
11 flex \
12 g++ \
13 gawk \
14 gdb \
15 git \
16 gperf \
17 help2man \
18 libncurses-dev \
19 libtool-bin \
20 make \
21 patch \
22 python2.7 \
23 sudo \
24 texinfo \
25 wget \
8bb4bdeb
XL
26 xz-utils \
27 libssl-dev \
28 pkg-config
32a655c1 29
8bb4bdeb
XL
30RUN curl -o /usr/local/bin/sccache \
31 https://s3.amazonaws.com/rust-lang-ci/rust-ci-mirror/2017-04-04-sccache-x86_64-unknown-linux-musl && \
32 chmod +x /usr/local/bin/sccache
32a655c1
SL
33
34RUN curl -OL https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64.deb && \
35 dpkg -i dumb-init_*.deb && \
36 rm dumb-init_*.deb
37ENTRYPOINT ["/usr/bin/dumb-init", "--"]
38
39# Ubuntu 16.04 (this contianer) ships with make 4, but something in the
40# toolchains we build below chokes on that, so go back to make 3
41RUN curl https://ftp.gnu.org/gnu/make/make-3.81.tar.gz | tar xzf - && \
42 cd make-3.81 && \
43 ./configure --prefix=/usr && \
44 make && \
45 make install && \
46 cd .. && \
47 rm -rf make-3.81
48
49RUN curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.22.0.tar.bz2 | \
50 tar xjf - && \
51 cd crosstool-ng && \
52 ./configure --prefix=/usr/local && \
53 make -j$(nproc) && \
54 make install && \
55 cd .. && \
56 rm -rf crosstool-ng
57
58RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild
59RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools
60USER rustbuild
61WORKDIR /tmp
62
63COPY patches/ /tmp/patches/
64COPY powerpc-linux-gnu.config build-powerpc-toolchain.sh /tmp/
65RUN ./build-powerpc-toolchain.sh
66
67USER root
68
69ENV PATH=$PATH:/x-tools/powerpc-unknown-linux-gnu/bin
70
71ENV \
72 CC_powerpc_unknown_linux_gnu=powerpc-unknown-linux-gnu-gcc \
73 AR_powerpc_unknown_linux_gnu=powerpc-unknown-linux-gnu-ar \
74 CXX_powerpc_unknown_linux_gnu=powerpc-unknown-linux-gnu-g++
75
76ENV HOSTS=powerpc-unknown-linux-gnu
77
78ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended
79ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
80
81# FIXME(#36150) this will fail the bootstrap. Probably means something bad is
82# happening!
83ENV NO_LLVM_ASSERTIONS 1