On 12/14/21 09:01, WANG Xuerui wrote: > 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. > > As the LoongArch target has not been merged yet, a check-tcg job is not > added at the moment, but cross builds with the TCG port are already > possible, and added to CI matrix. > > Due to constant flux of the toolchain sources used (especially that of > glibc), the binaries built with this image could currently segfault when > run on actual hardware. This image is expected to be updated once a > known-good combination is again verified. > > As a reference, the image takes about 27 minutes to rebuild on a > Threadripper 3990X system with Docker operating on HDD; YMMV but it > probably wouldn't become significantly shorter, as everything needs to > be built from source in our case. > > Signed-off-by: WANG Xuerui <g...@xen0n.name> > --- > .gitlab-ci.d/container-cross.yml | 27 ++++ > .gitlab-ci.d/crossbuilds.yml | 19 +++ > MAINTAINERS | 2 + > tests/docker/Makefile.include | 21 +++ > .../gentoo-loongarch64-cross.docker | 19 +++ > .../build-toolchain.sh | 125 ++++++++++++++++++ > 6 files changed, 213 insertions(+) > create mode 100644 tests/docker/dockerfiles/gentoo-loongarch64-cross.docker > create mode 100755 > tests/docker/dockerfiles/gentoo-loongarch64-cross.docker.d/build-toolchain.sh
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>