From 12f9b9e2cd84687e313c24cdd1b6aa8a74d38826 Mon Sep 17 00:00:00 2001 From: yyjeqhc Date: Sun, 29 Jun 2025 18:31:55 +0800 Subject: [PATCH] enable cgo for buildmode=pie and linkmode=external --- k3s-plugins.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/k3s-plugins.spec b/k3s-plugins.spec index 0683555..00d10e1 100644 --- a/k3s-plugins.spec +++ b/k3s-plugins.spec @@ -2,7 +2,7 @@ Name: k3s-plugins Version: 1.1.1 -Release: 3 +Release: 4 Summary: some standard networking plugins, maintained by the CNI team URL : https://github.com/rancher/plugins Source0: https://github.com/rancher/plugins/archive/refs/tags/v%{version}-%{tagname}.tar.gz @@ -76,7 +76,7 @@ popd OutputDir=`pwd`/.gopath/cni GOPATH=`pwd`/.gopath pushd .gopath/src/github.com/containernetworking/plugins -GO111MODULE=off GOPATH=$GOPATH CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -buildmode=pie -ldflags "$VERSIONFLAGS $LDFLAGS -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now ' " -o $OutputDir +GO111MODULE=off GOPATH=$GOPATH CGO_ENABLED=1 "${GO}" build -tags "$TAGS" -buildmode=pie -ldflags "$VERSIONFLAGS $LDFLAGS -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now ' " -o $OutputDir popd %install @@ -87,6 +87,9 @@ install -p -m 755 ./.gopath/cni $RPM_BUILD_ROOT/%{_datadir}/k3s/ %{_datadir}/k3s/ %changelog +* Sun Jun 29 2025 yyjeqhc - 1.1.1-4 +- enable cgo for buildmode=pie and linkmode=external + * Tue Jul 11 2023 huajingyun - 1.1.1-3 - Add loong64 support -- Gitee