]>
Commit | Line | Data |
---|---|---|
32a655c1 SL |
1 | FROM ubuntu:16.04 |
2 | ||
3 | RUN 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 |
30 | RUN 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 | |
34 | RUN 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 | |
37 | ENTRYPOINT ["/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 | |
41 | RUN 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 | ||
49 | RUN 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 | ||
58 | RUN groupadd -r rustbuild && useradd -m -r -g rustbuild rustbuild | |
59 | RUN mkdir /x-tools && chown rustbuild:rustbuild /x-tools | |
60 | USER rustbuild | |
61 | WORKDIR /tmp | |
62 | ||
63 | COPY patches/ /tmp/patches/ | |
64 | COPY powerpc-linux-gnu.config build-powerpc-toolchain.sh /tmp/ | |
65 | RUN ./build-powerpc-toolchain.sh | |
66 | ||
67 | USER root | |
68 | ||
69 | ENV PATH=$PATH:/x-tools/powerpc-unknown-linux-gnu/bin | |
70 | ||
71 | ENV \ | |
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 | ||
76 | ENV HOSTS=powerpc-unknown-linux-gnu | |
77 | ||
78 | ENV RUST_CONFIGURE_ARGS --host=$HOSTS --enable-extended | |
79 | ENV 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! | |
83 | ENV NO_LLVM_ASSERTIONS 1 |