From 6c3e6b09703fba779466f11c3fd8e5674e19cef3 Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 29 Nov 2019 17:35:59 +0100 Subject: [PATCH] Fix Pi build needing -latomic. Issue #6275. --- src/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Makefile b/src/Makefile index 9fc230f94..e67731982 100644 --- a/src/Makefile +++ b/src/Makefile @@ -77,6 +77,15 @@ FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) FINAL_LIBS=-lm DEBUG=-g -ggdb +# Linux ARM needs -latomic at linking time +ifneq (,$(filter aarch64 armv,$(uname_M))) + FINAL_LIBS+=-latomic +else +ifneq (,$(findstring armv,$(uname_M))) + FINAL_LIBS+=-latomic +endif +endif + ifeq ($(uname_S),SunOS) # SunOS ifneq ($(@@),32bit)