Skip to content

Commit 2bea502

Browse files
authored
Merge pull request redis#6975 from dustinmm80/add-arm-latomic-linking
Fix Pi building needing -latomic, 5.0 branch backport
2 parents fd44130 + b593140 commit 2bea502

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
7777
FINAL_LIBS=-lm
7878
DEBUG=-g -ggdb
7979

80+
# Linux ARM needs -latomic at linking time
81+
ifneq (,$(filter aarch64 armv,$(uname_M)))
82+
FINAL_LIBS+=-latomic
83+
else
84+
ifneq (,$(findstring armv,$(uname_M)))
85+
FINAL_LIBS+=-latomic
86+
endif
87+
endif
88+
8089
ifeq ($(uname_S),SunOS)
8190
# SunOS
8291
ifneq ($(@@),32bit)

0 commit comments

Comments
 (0)