Skip to content

Commit 91f7de1

Browse files
committed
Makefile: targeted workaround for s390x builds on c10s
Signed-off-by: John Eckersberg <[email protected]>
1 parent 24f2dd0 commit 91f7de1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,22 @@ TAR_REPRODUCIBLE = tar --mtime="@${SOURCE_DATE_EPOCH}" --sort=name --owner=0 --g
2727
# (Note we should also make installation of the units conditional on the rhsm feature)
2828
CARGO_FEATURES ?= $(shell . /usr/lib/os-release; if echo "$$ID_LIKE" |grep -qF rhel; then echo rhsm; fi)
2929

30+
# https://issues.redhat.com/browse/RHEL-116881
31+
ARCH ?= $(shell uname -m)
32+
ID ?= $(shell source /etc/os-release && echo $ID)
33+
VERSION_ID ?= $(shell source /etc/os-release && echo $VERSION_ID)
34+
ifeq ($(ARCH),s390x)
35+
ifeq ($(ID), centos)
36+
ifeq ($(VERSION_ID), 10)
37+
CARGO_BUILD_ENV ?= MALLOC_MMAP_MAX_=0
38+
endif
39+
endif
40+
endif
41+
3042
all: bin manpages
3143

3244
bin:
33-
cargo build --release --features "$(CARGO_FEATURES)"
45+
$(CARGO_BUILD_ENV) cargo build --release --features "$(CARGO_FEATURES)"
3446

3547
.PHONY: manpages
3648
manpages:

0 commit comments

Comments
 (0)