Add loong64 support in seccomp and PIE

Signed-off-by: zhaixiaojuan <zhaixiaojuan@loongson.cn>
This commit is contained in:
zhaixiaojuan
2025-10-16 09:50:37 +08:00
parent f023e1c222
commit 885509afdf
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

@@ -22,6 +22,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.