From 277113f4bf654b394ea76f6bcca942f2b09da292 Mon Sep 17 00:00:00 2001 From: iGxnon Date: Mon, 25 Mar 2024 00:13:15 +0800 Subject: [PATCH] temporarily fix building for riscv Signed-off-by: iGxnon (cherry picked from commit 2a25b4ae0fd8527354002eed5103b271b6867f61) --- alertmanager.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/alertmanager.spec b/alertmanager.spec index 5f6a4a4..622df79 100644 --- a/alertmanager.spec +++ b/alertmanager.spec @@ -2,7 +2,7 @@ Name: alertmanager Version: 0.26.0 -Release: 1 +Release: 2 Summary: Prometheus Alertmanager. License: Apache-2.0 URL: https://github.com/prometheus/%{name} @@ -37,7 +37,11 @@ tar -xzvf %{SOURCE4} mkdir -p $(go env GOPATH)/bin/ cp -n $(which promu) $(go env GOPATH)/bin/ -export GOFLAGS="-mod=vendor -buildmode=pie" +export GOFLAGS="-mod=vendor -buildmode=pie +%ifarch riscv64 +-gcflags=all=-d=wrapglobalmapctl=1 +%endif +" make build %install @@ -75,6 +79,11 @@ exit 0 %dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus %changelog +* Sat Mar 23 2024 Wenhui Tang - 0.26.0-2 +- Append flags to GOFLAGS to fix go linker bugs for riscv +- Related issue: https://github.com/golang/go/issues/62465 +- This is a temporary solution that requires fixing the upstream riscv support for golang. + * Tue Sep 5 2023 Zhengxin Guo - 0.26.0-1 - update to 0.26.0 to fix CVE-2023-40577 -- Gitee