[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 31/31] tests/docker: Add gentoo-loongarch64-cross image an

From: Richard Henderson
Subject: Re: [PATCH v7 31/31] tests/docker: Add gentoo-loongarch64-cross image and run cross builds in GitLab
Date: Tue, 23 Nov 2021 11:20:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0

On 11/22/21 11:42 AM, 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

That seems fine. I'm familiar with gentoo (only remaining distro for alpha), and it's a good way to bootstrap a new system.

+       $(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 
+                       "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,                                   \

Note the addition of debian-toolchain-run, handling the boilerplate for this for microblaze and nios2.

(I haven't converted hexagon to this, because I had expected to be able to replace that with a pre-built toolchain. But then the compiler turned out to be buggy, and that patch got dropped. I hope we can revisit this during 7.0.)

+FROM gentoo/stage3:20211116

If I understand correctly, this should be the fully qualified name: docker.io/library/etc. Alex? Phil?

+"$CROSS_EMERGE" -1 --onlydeps -j4 gawk
+"$CROSS_EMERGE" -1 --onlydeps -j4 qemu

Why the quotes on CROSS_EMERGE?  Use $J, which you computed earlier.

All minor nits, as it Worked For Me.  Thanks for putting this together.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]