summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Collins <dcollins@gitlab.com>2020-03-11 11:34:59 -0500
committerDustin Collins <dcollins@gitlab.com>2020-03-11 11:34:59 -0500
commitb5931405fff42429ff01c6ef219a9a58c8194897 (patch)
tree1225ae8eba636f93ff9e7644a06cf21cd2449ab1
parentfd4413002d89d643b273cedc8fb51e12b9ec0eb4 (diff)
downloadredis-b5931405fff42429ff01c6ef219a9a58c8194897.tar.gz
Fix Pi building needing -latomic, backport
-rw-r--r--src/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 2a6864929..4b2a31cc7 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)