Normally this would be based on qemu/debian10 or qemu/ubuntu2004, but
after a week-long struggle, I still cannot build stage2 gcc with the
known-good LoongArch toolchain sources, so I chose the least-resistance
path with Gentoo as base image. As this image is not expected to be
re-built by CI, like hexagon, it should not take much maintenance
effort; also it's expected to be replaced as soon as Debian is
available.
+docker-image-gentoo-loongarch64-cross:
$(DOCKER_FILES_DIR)/gentoo-loongarch64-cross.docker
+ $(if $(NOCACHE),
\
+ $(call quiet-command,
\
+ $(DOCKER_SCRIPT) build -t qemu/gentoo-loongarch64-cross -f
$< \
+ $(if $V,,--quiet) --no-cache
\
+ --registry $(DOCKER_REGISTRY) --extra-files
\
+
$(DOCKER_FILES_DIR)/gentoo-loongarch64-cross.docker.d/build-toolchain.sh, \
+ "BUILD", "gentoo-loongarch64-cross"),
\
+ $(call quiet-command,
\
+ $(DOCKER_SCRIPT) fetch $(if $V,,--quiet)
\
+ qemu/gentoo-loongarch64-cross
$(DOCKER_REGISTRY), \
+ "FETCH", "gentoo-loongarch64-cross")
\
+ $(call quiet-command,
\
+ $(DOCKER_SCRIPT) update $(if $V,,--quiet)
\
+ qemu/gentoo-loongarch64-cross
--add-current-user, \
+ "PREPARE", "gentoo-loongarch64-cross"))
+
+
debian-toolchain-run = \
$(if $(NOCACHE), \
$(call quiet-command, \