]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: on ARM, must be linked to libatomic.
authorDavid Carlier <devnexen@gmail.com>
Sun, 15 Mar 2020 10:30:51 +0000 (10:30 +0000)
committerWilly Tarreau <w@1wt.eu>
Mon, 16 Mar 2020 07:33:17 +0000 (08:33 +0100)
For load/store operations, needs to be linked to.
tested on raspberry.

Makefile

index c04e699d736b70f9556fc3e3c17e57d4f6a0777e..469001af3d1c5412c8272db4bb14dc265297065c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -328,6 +328,9 @@ ifeq ($(TARGET),linux-glibc)
     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 USE_BACKTRACE)
+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