Skip to content

Commit

Permalink
add ifarch condition
Browse files Browse the repository at this point in the history
otherwise pie build fails in s390x
  • Loading branch information
stefanotorresi committed Dec 19, 2024
1 parent feee4fb commit 57bbe75
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ Prometheus exporter for Pacemaker HA clusters metrics
%define shortname ha_cluster_exporter

%build

export CGO_ENABLED=0
%ifarch s390x
export CGO_ENABLED=1
%else
export CGO_ENABLED=0
%endif
go build -mod=vendor \
-buildmode=pie \
-ldflags="-s -w -X github.com/prometheus/common/version.Version=%{version}" \
Expand Down

0 comments on commit 57bbe75

Please sign in to comment.