]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: fix regex syntax in ARM platform detection
authorWilly Tarreau <w@1wt.eu>
Mon, 16 Mar 2020 08:38:00 +0000 (09:38 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 16 Mar 2020 08:38:00 +0000 (09:38 +0100)
Commit d93e6ec ("BUILD: on ARM, must be linked to libatomic.") broke the
build due to a missing backslash in front of the '#':

  Makefile:331: *** invalid syntax in conditional.  Stop.

Let's address this and make sure we only pick relevant lines (and not
possibly empty lines).

Makefile

index 469001af3d1c5412c8272db4bb14dc265297065c..959d5b74a97f079dc834098e5f5ef94387fed02b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -328,7 +328,7 @@ 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__)
+ifneq ($(shell echo __arm__/__aarch64__ | $(CC) -E -xc - | grep -v '^[^\#]'),__arm__/__aarch64__)
   TARGET_LDFLAGS=-latomic
 endif
 endif