2 RUN apt-get update && \
3 apt-get install -y --no-install-recommends \
7 RUN curl -f https://curl.se/ca/cacert.pem -o cacert.pem
11 # The ca-certificates in ubuntu-16 is too old, so update the certificates
12 # with something more recent.
13 COPY --from=0 /tmp/cacert.pem /tmp/cacert.pem
14 ENV CURL_CA_BUNDLE /tmp/cacert.pem
16 COPY scripts/cross-apt-packages.sh /scripts/
17 RUN sh /scripts/cross-apt-packages.sh
19 # Ubuntu 16.04 (this container) ships with make 4, but something in the
20 # toolchains we build below chokes on that, so go back to make 3
21 COPY scripts/make3.sh /scripts/
22 RUN sh /scripts/make3.sh
24 COPY scripts/crosstool-ng.sh /scripts/
25 RUN sh /scripts/crosstool-ng.sh
27 COPY scripts/rustbuild-setup.sh /scripts/
28 RUN sh /scripts/rustbuild-setup.sh
32 COPY host-x86_64/dist-aarch64-linux/aarch64-linux-gnu.config host-x86_64/dist-aarch64-linux/build-toolchains.sh /tmp/
33 RUN ./build-toolchains.sh
37 COPY scripts/sccache.sh /scripts/
38 RUN sh /scripts/sccache.sh
40 COPY scripts/cmake.sh /scripts/
43 ENV PATH=$PATH:/x-tools/aarch64-unknown-linux-gnueabi/bin
45 ENV CC_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-gcc \
46 AR_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-ar \
47 CXX_aarch64_unknown_linux_gnu=aarch64-unknown-linux-gnueabi-g++
49 ENV HOSTS=aarch64-unknown-linux-gnu
51 ENV RUST_CONFIGURE_ARGS \
55 ENV SCRIPT python3 ../x.py dist --host $HOSTS --target $HOSTS