2 # Docker Hexagon cross-compiler target
4 # This docker target is used for building hexagon tests. As it also
5 # needs to be able to build QEMU itself in CI we include it's
6 # build-deps. It is also a "stand-alone" image so as not to be
7 # triggered by re-builds on other base images given it takes a long
12 # Install common build utilities
14 DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
15 DEBIAN_FRONTEND=noninteractive eatmydata \
16 apt install -y --no-install-recommends \
24 ENV TOOLCHAIN_INSTALL /usr/local
27 ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz
28 ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz
29 ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz
31 ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
33 RUN cd /root/hexagon-toolchain && ./build-toolchain.sh
35 FROM debian:buster-slim
36 # Duplicate deb line as deb-src
37 RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
38 # Install QEMU build deps for use in CI
40 DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
41 DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \
42 DEBIAN_FRONTEND=noninteractive eatmydata \
43 apt build-dep -yy --arch-only qemu
44 COPY --from=0 /usr/local /usr/local
45 ENV PATH $PATH:/usr/local/bin/