Skip to content

Commit 57bbe75

Browse files
author
Stefano Torresi
committed
add ifarch condition
otherwise pie build fails in s390x
1 parent feee4fb commit 57bbe75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packaging/obs/prometheus-ha_cluster_exporter/prometheus-ha_cluster_exporter.spec

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,11 @@ Prometheus exporter for Pacemaker HA clusters metrics
4646
%define shortname ha_cluster_exporter
4747

4848
%build
49-
50-
export CGO_ENABLED=0
49+
%ifarch s390x
50+
export CGO_ENABLED=1
51+
%else
52+
export CGO_ENABLED=0
53+
%endif
5154
go build -mod=vendor \
5255
-buildmode=pie \
5356
-ldflags="-s -w -X github.com/prometheus/common/version.Version=%{version}" \

0 commit comments

Comments
 (0)