From 891a676f81e7a891443dee71b0defc4e9d7d3cb0 Mon Sep 17 00:00:00 2001 From: Wenlong Zhang Date: Wed, 16 Apr 2025 14:11:51 +0800 Subject: [PATCH] fix build error on loongarch64 Signed-off-by: Wenlong Zhang (cherry picked from commit 9b2ed44f15e967ee2c627e046fb36d1bba6eee72) --- 0002-Set-CGO_ENABLED-1-on-loong64.patch | 25 +++++++++++++++++++++++++ moby.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 0002-Set-CGO_ENABLED-1-on-loong64.patch diff --git a/0002-Set-CGO_ENABLED-1-on-loong64.patch b/0002-Set-CGO_ENABLED-1-on-loong64.patch new file mode 100644 index 0000000..9c9add5 --- /dev/null +++ b/0002-Set-CGO_ENABLED-1-on-loong64.patch @@ -0,0 +1,25 @@ +From 846b34f112fd9684a95238dd3a6352e0f3f58a48 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Wed, 16 Apr 2025 11:41:32 +0800 +Subject: [PATCH] Set CGO_ENABLED=1 on loong64 + +--- + scripts/build/.variables | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/build/.variables b/scripts/build/.variables +index de7945d..a9af6cb 100755 +--- a/scripts/build/.variables ++++ b/scripts/build/.variables +@@ -48,7 +48,7 @@ if [ -z "$CGO_ENABLED" ]; then + case "$(go env GOOS)" in + linux) + case "$(go env GOARCH)" in +- amd64|arm64|arm|s390x|riscv64) ++ amd64|arm64|arm|s390x|riscv64|loong64) + CGO_ENABLED=1 + ;; + *) +-- +2.43.0 + diff --git a/moby.spec b/moby.spec index d029f7e..4ae3f7f 100644 --- a/moby.spec +++ b/moby.spec @@ -7,7 +7,7 @@ Name: moby Version: 25.0.3 -Release: 23 +Release: 24 Summary: The open-source application container engine License: Apache-2.0 URL: https://www.docker.com @@ -22,6 +22,7 @@ Source4: docker.socket Source5: docker.sysconfig # Patch 0001-0999 for cli Patch0001: 0001-Set-CGO_ENABLED-1-on-riscv64.patch +Patch0002: 0002-Set-CGO_ENABLED-1-on-loong64.patch # Patch 1001-1999 for moby Patch1001: 1001-fix-cve-2024-29018.patch Patch1002: 1002-fix-cve-2024-32473.patch @@ -226,6 +227,9 @@ fi %systemd_postun_with_restart docker.service %changelog +* Wed Apr 16 2025 Wenlong Zhang - 25.0.3-24 +- fix build error on loongarch64 + * Fri Jan 17 2025 laokz - 25.0.3-23 - backport cli v26.1.0 patch to fix riscv64 build error -- Gitee