From 4ffdf2a9a327c13dfaa09f12f0d372cce93f4e1c Mon Sep 17 00:00:00 2001 From: Huang Yang Date: Mon, 1 Sep 2025 14:53:41 +0800 Subject: [PATCH] Add loongarch64 support --- 0001-gobpf-0.2.0-add-loong64.patch | 22 ++++++++++++++++++++++ golang-github-iovisor-gobpf.spec | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 0001-gobpf-0.2.0-add-loong64.patch diff --git a/0001-gobpf-0.2.0-add-loong64.patch b/0001-gobpf-0.2.0-add-loong64.patch new file mode 100644 index 0000000..8e83894 --- /dev/null +++ b/0001-gobpf-0.2.0-add-loong64.patch @@ -0,0 +1,22 @@ +From c73fa9dab4e3e4c9da5dec5f1e2c681833118983 Mon Sep 17 00:00:00 2001 +From: Huang Yang +Date: Mon, 1 Sep 2025 14:49:53 +0800 +Subject: [PATCH] gobpf 0.2.0 add loong64 + +--- + elf/utsname_int8.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/elf/utsname_int8.go b/elf/utsname_int8.go +index 2c0551f..73087ed 100644 +--- a/elf/utsname_int8.go ++++ b/elf/utsname_int8.go +@@ -1,4 +1,4 @@ +-// +build linux,386 linux,amd64 linux,arm64 ++// +build linux,386 linux,amd64 linux,arm64 linux,loong64 + + package elf + +-- +2.43.7 + diff --git a/golang-github-iovisor-gobpf.spec b/golang-github-iovisor-gobpf.spec index 6a6e6c9..1fc7968 100644 --- a/golang-github-iovisor-gobpf.spec +++ b/golang-github-iovisor-gobpf.spec @@ -18,13 +18,14 @@ Requires: bcc-devel } Name: %{goname} -Release: 2%{?dist} +Release: 3%{?dist} Summary: Go bindings for creating BPF programs License: GPL-2.0-only AND Apache-2.0 URL: %{gourl} Source0: %{gosource} Patch: %{url}/commit/0e5464f03ed2b72613e2e209e2fef8a4bbad5f30.patch +Patch3000: 0001-gobpf-0.2.0-add-loong64.patch BuildRequires: bcc-devel @@ -52,6 +53,10 @@ rm examples/bcc/perf/.gitignore examples/tracepipe/.gitignore %gopkgfiles %changelog +* Mon Sep 01 2025 Huang Yang - 0.2.0-3 +- [Type] bugfix +- [DESC] add loongarch support + * Sat Jun 07 2025 bbrucezhang - 0.2.0-2 - Rebuilt for loongarch64 -- Gitee