tests/docker/dockerfiles: Add debian-loongarch-cross.docker

Use the pre-packaged toolchain provided by Loongson via github.

Tested-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220704070824.965429-1-richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-07-04 12:36:29 +05:30
parent da7da9d5e6
commit b70ec50b9d
3 changed files with 32 additions and 0 deletions

5
configure vendored
View File

@ -1933,6 +1933,7 @@ probe_target_compiler() {
hexagon) container_hosts=x86_64 ;;
hppa) container_hosts=x86_64 ;;
i386) container_hosts=x86_64 ;;
loongarch64) container_hosts=x86_64 ;;
m68k) container_hosts=x86_64 ;;
microblaze) container_hosts=x86_64 ;;
mips64el) container_hosts=x86_64 ;;
@ -1987,6 +1988,10 @@ probe_target_compiler() {
container_image=fedora-i386-cross
container_cross_prefix=
;;
loongarch64)
container_image=debian-loongarch-cross
container_cross_prefix=loongarch64-unknown-linux-gnu-
;;
m68k)
container_image=debian-m68k-cross
container_cross_prefix=m68k-linux-gnu-

View File

@ -140,6 +140,7 @@ docker-image-debian-nios2-cross: $(DOCKER_FILES_DIR)/debian-toolchain.docker \
# Specialist build images, sometimes very limited tools
docker-image-debian-tricore-cross: docker-image-debian10
docker-image-debian-all-test-cross: docker-image-debian10
docker-image-debian-loongarch-cross: docker-image-debian11
docker-image-debian-microblaze-cross: docker-image-debian10
docker-image-debian-nios2-cross: docker-image-debian10
docker-image-debian-powerpc-test-cross: docker-image-debian11
@ -149,6 +150,7 @@ docker-image-debian-riscv64-test-cross: docker-image-debian11
DOCKER_PARTIAL_IMAGES += debian-alpha-cross
DOCKER_PARTIAL_IMAGES += debian-powerpc-test-cross
DOCKER_PARTIAL_IMAGES += debian-hppa-cross
DOCKER_PARTIAL_IMAGES += debian-loongarch-cross
DOCKER_PARTIAL_IMAGES += debian-m68k-cross debian-mips64-cross
DOCKER_PARTIAL_IMAGES += debian-microblaze-cross
DOCKER_PARTIAL_IMAGES += debian-nios2-cross

View File

@ -0,0 +1,25 @@
#
# Docker cross-compiler target
#
# This docker target builds on the debian11 base image,
# using a prebuilt toolchains for LoongArch64 from:
# https://github.com/loongson/build-tools/releases
#
FROM qemu/debian11
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
DEBIAN_FRONTEND=noninteractive eatmydata \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
gettext \
git \
python3-minimal
RUN curl -#SL https://github.com/loongson/build-tools/releases/download/2022.05.29/loongarch64-clfs-5.0-cross-tools-gcc-glibc.tar.xz \
| tar -xJC /opt
ENV PATH $PATH:/opt/cross-tools/bin
ENV LD_LIBRARY_PATH /opt/cross-tools/lib:/opt/cross-tools/loongarch64-unknown-linux-gnu/lib:$LD_LIBRARY_PATH