Add loong64 support

Signed-off-by: Jingyun Hua <huajingyun@loongson.cn>
This commit is contained in:
Jingyun Hua 2023-06-06 06:13:09 +00:00
parent 685b8cebe7
commit 3d5303cb1b
3 changed files with 40 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 1dea428808d6a7bbc01c891649bad93adb012eb0 Mon Sep 17 00:00:00 2001
From: Jingyun Hua <huajingyun@loongson.cn>
Date: Thu, 1 Jun 2023 06:52:55 +0000
Subject: [PATCH] bbolt:add loong64 support
---
vendor/go.etcd.io/bbolt/bolt_loong64.go | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 vendor/go.etcd.io/bbolt/bolt_loong64.go
diff --git a/vendor/go.etcd.io/bbolt/bolt_loong64.go b/vendor/go.etcd.io/bbolt/bolt_loong64.go
new file mode 100644
index 0000000..31c17c1
--- /dev/null
+++ b/vendor/go.etcd.io/bbolt/bolt_loong64.go
@@ -0,0 +1,10 @@
+//go:build loong64
+// +build loong64
+
+package bbolt
+
+// maxMapSize represents the largest mmap size supported by Bolt.
+const maxMapSize = 0xFFFFFFFFFFFF // 256TB
+
+// maxAllocSize is the size used when creating array pointers.
+const maxAllocSize = 0x7FFFFFFF
--
2.33.0

View File

@ -3,11 +3,14 @@
%global version_suffix k3s1
Version: 1.6.6
Name: k3s-containerd
Release: 4
Release: 5
Summary: An industry-standard container runtime
License: Apache-2.0
URL: https://github.com/k3s-io/containerd
Source0: https://github.com/k3s-io/containerd/archive/refs/tags/v%{version}-%{version_suffix}.tar.gz
#source1 version sys@v0.0.0-20220908164124-27713097b956
Source1: sys.tar.gz
Patch0: bbolt-add-loong64-support.patch
BuildRequires: golang glibc-static make btrfs-progs-devel
@ -19,7 +22,11 @@ system: image transfer and storage, container execution and supervision,
low-level storage and network attachments, etc.
%prep
%autosetup -n containerd-%{version}-%{version_suffix}
%autosetup -n containerd-%{version}-%{version_suffix} -p1
%ifarch loongarch64
rm -rf vendor/golang.org/x/sys
tar -xf %{SOURCE1} -C vendor/golang.org/x/
%endif
%build
mkdir -p k3s-containerd/bin
@ -68,6 +75,9 @@ cp -rf %{_builddir}/containerd-%{version}-%{version_suffix}/. %{buildroot}%{_lib
%changelog
* Tue Jun 06 2023 huajingyun <huajingyun@loongson.cn> - 1.6.6-k3s1-5
- Add loong64 support
* Fri Mar 03 2023 wangkai <wangkai385@h-partners.com> - 1.6.6-k3s1-4
- Add PIE,BIND_NOW,RELRO secure compilation options

BIN
sys.tar.gz Normal file

Binary file not shown.