From 48c841fe2d17d76619e81760e842b825c7f13b95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=99=93=E4=BC=9F?= Date: Mon, 6 Jul 2026 22:38:08 +0800 Subject: [PATCH] feat: add loong64 (LoongArch) build support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add loong64 (LoongArch) architecture support to the build system and CI: - Makefile.linux: add loong64 to architectures that don't use -buildmode=pie (consistent with other non-amd64 architectures like mips, ppc64) - ci.yml: add linux/loong64 to crossbuild matrix with CGO_ENABLED=0 - RELEASES.md: add linux/loong64 as Tier 3 (Build-verified) platform The linux/loong64 release build and nightly build entries are intentionally excluded — the cross-compilation toolchain is not yet available in Ubuntu 22.04 apt repositories (no crossbuild-essential-loong64 package). The crossbuild CI check uses CGO_ENABLED=0. Nightly and release builds will be re-enabled once the upstream tonistiigi/xx base image provides the loong64 cross-compilation toolchain. Go has supported GOARCH=loong64 as a first-class port since Go 1.21. The seccomp default profile already includes loong64 support (contrib/seccomp). Tracked by: https://github.com/containerd/containerd/issues/13641 Signed-off-by: 徐晓伟 --- .github/workflows/ci.yml | 5 +++++ Makefile.linux | 2 +- RELEASES.md | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f2b795fae198..92b383e39fa1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,6 +138,8 @@ jobs: goarch: amd64 - goos: freebsd goarch: arm64 + - goos: linux + goarch: loong64 - goos: windows goarch: arm64 @@ -169,6 +171,9 @@ jobs: windows/arm64) echo "CGO_ENABLED=0" >> $GITHUB_ENV ;; + linux/loong64) + echo "CGO_ENABLED=0" >> $GITHUB_ENV + ;; esac if [ -n "${packages}" ]; then diff --git a/Makefile.linux b/Makefile.linux index 1616b3a0cf5e1..6f44a29336fe4 100644 --- a/Makefile.linux +++ b/Makefile.linux @@ -20,7 +20,7 @@ COMMANDS += containerd-shim-runc-v2 # check GOOS for cross compile builds ifeq ($(GOOS),linux) - ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64)) + ifneq ($(GOARCH),$(filter $(GOARCH),mips mipsle mips64 mips64le ppc64 loong64)) ifeq ($(STATIC),) GO_GCFLAGS += -buildmode=pie endif diff --git a/RELEASES.md b/RELEASES.md index c526fc48058b3..b5d7f971c8fe3 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -237,6 +237,7 @@ verification. Users are free to build from source for their own use. | linux/s390x | 2 | ✅ | ✅ | ❌ | ✅ | | linux/arm/v7 | 3 | ❌ | ❌ | ❌ | ✅ | | linux/arm/v5 | 3 | ❌ | ❌ | ❌ | ✅ | +| linux/loong64 | 3 | ❌ | ❌ | ❌ | ✅ | | darwin/arm64 | 3 | ❌ | ❌ | ❌ | ✅ | | freebsd/amd64 | 3 | ❌ | ❌ | ❌ | ✅ | | freebsd/arm64 | 3 | ❌ | ❌ | ❌ | ✅ |