BUILD: on ARM, must be linked to libatomic.

For load/store operations, needs to be linked to.
tested on raspberry.

(cherry picked from commit d93e6ec4cc44b48bc5370c724d3661b52ba9976c)
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 4c800429743d79016d74baecebfea63c6e5618fd)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/Makefile b/Makefile
index 6e4f61c..c97971d 100644
--- a/Makefile
+++ b/Makefile
@@ -324,6 +324,9 @@
     USE_CPU_AFFINITY USE_THREAD USE_EPOLL USE_FUTEX USE_LINUX_TPROXY          \
     USE_ACCEPT4 USE_LINUX_SPLICE USE_PRCTL USE_THREAD_DUMP USE_NS USE_TFO     \
     USE_GETADDRINFO)
+ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E -xc - | grep -v '^#'),__arm__/__aarch64__)
+  TARGET_LDFLAGS=-latomic
+endif
 endif
 
 # For linux >= 2.6.28, glibc without new features