feat: add loong64 (LoongArch) build support

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: 徐晓伟 <xuxiaowei@xuxiaowei.com.cn>
This commit is contained in:
徐晓伟 committed 2026-07-07 01:43:14 +08:00
1 parent 072dbf625f
commit 48c841fe2d
3 files changed
+7 -1

No files matched your search

+5
View File
@@ -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
+1 -1
View File
@@ -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
+1
View File
@@ -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 | ❌ | ❌ | ❌ | ✅ |