1#
2# Docker cross-compiler target
3#
4# This docker target builds on the debian11 base image,
5# using a prebuilt toolchains for LoongArch64 from:
6# https://github.com/loongson/build-tools/releases
7#
8FROM qemu/debian11
9
10RUN apt-get update && \
11    DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
12    DEBIAN_FRONTEND=noninteractive eatmydata \
13    apt-get install -y --no-install-recommends \
14        build-essential \
15        ca-certificates \
16        curl \
17        gettext \
18        git \
19        python3-minimal
20
21RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2022.05.29/loongarch64-clfs-5.0-cross-tools-gcc-glibc.tar.xz \
22    | tar -xJC /opt
23
24ENV PATH $PATH:/opt/cross-tools/bin
25ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH
26