temporarily fix building for riscv

Signed-off-by: iGxnon <igxnon@gmail.com>
(cherry picked from commit 2a25b4ae0fd8527354002eed5103b271b6867f61)
This commit is contained in:
iGxnon 2024-03-25 00:13:15 +08:00 committed by openeuler-sync-bot
parent 9c8f2b6481
commit 5f6854843f

View File

@ -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 <wenhui.oerv@isrc.iscas.ac.cn> - 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 <guozhengxin@kylinos.cn> - 0.26.0-1
- update to 0.26.0 to fix CVE-2023-40577