Merge pull request #5062 from loong64/pr-4938-to-release-1.4

[1.4] Add loong64 support in seccomp and PIE
This commit is contained in:
Kir Kolyshkin
2025-12-15 11:13:03 -08:00
committed by GitHub
3 changed files with 3 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ TRIMPATH := -trimpath
GO_BUILDMODE :=
# Enable dynamic PIE executables on supported platforms.
ifneq (,$(filter $(GOARCH),386 amd64 arm arm64 ppc64le riscv64 s390x))
ifneq (,$(filter $(GOARCH),386 amd64 arm arm64 loong64 ppc64le riscv64 s390x))
ifeq (,$(findstring -race,$(EXTRA_FLAGS)))
GO_BUILDMODE := "-buildmode=pie"
endif

View File

@@ -24,6 +24,7 @@ runc binary | seccomp
`ppc64le` | `SCMP_ARCH_PPC64LE`
`riscv64` | `SCMP_ARCH_RISCV64`
`s390x` | `SCMP_ARCH_S390`, `SCMP_ARCH_S390X`
`loong64` | `SCMP_ARCH_LOONGARCH64`
The runc binary might be compilable for i386, big-endian PPC64,
and several MIPS variants too, but these architectures are not officially supported.

View File

@@ -65,6 +65,7 @@ var archs = map[string]string{
"SCMP_ARCH_RISCV64": "riscv64",
"SCMP_ARCH_S390": "s390",
"SCMP_ARCH_S390X": "s390x",
"SCMP_ARCH_LOONGARCH64": "loong64",
}
// KnownArchs returns the list of the known archs.