summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalvatore Sanfilippo <antirez@gmail.com>2020-03-12 15:55:24 +0100
committerGitHub <noreply@github.com>2020-03-12 15:55:24 +0100
commit2bea502d257a4a6c3bf1109937c3e47b96e85dae (patch)
tree1225ae8eba636f93ff9e7644a06cf21cd2449ab1
parentfd4413002d89d643b273cedc8fb51e12b9ec0eb4 (diff)
parentb5931405fff42429ff01c6ef219a9a58c8194897 (diff)
downloadredis-2bea502d257a4a6c3bf1109937c3e47b96e85dae.tar.gz
Merge pull request #6975 from dustinmm80/add-arm-latomic-linking
Fix Pi building needing -latomic, 5.0 branch 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)