1 From 2ad19f9492fa21ea733f191a38b379ca31f4657d Mon Sep 17 00:00:00 2001
2 From: Jan Palus <jpalus@fastmail.com>
3 Date: Sat, 3 Sep 2022 18:27:24 +0200
4 Subject: [PATCH] Make ARM arch check more consistent
6 There are three different type of checks if build is for ARM:
7 - exact (ifneq0 match for only armv6 and armv7 (arm < 6 not being
9 - filter match (broken due to lack of wildcard)
12 Unifiy them all and settle for $(filter armv%,$(uname_M)) as most
15 src/Makefile | 10 ++++------
16 1 file changed, 4 insertions(+), 6 deletions(-)
18 diff --git a/src/Makefile b/src/Makefile
19 index fdfef2b3c..7334ab9d8 100644
22 @@ -57,19 +57,17 @@ endif
24 # Default allocator defaults to Jemalloc if it's not an ARM
26 -ifneq ($(uname_M),armv6l)
27 -ifneq ($(uname_M),armv7l)
28 +ifeq (,$(filter armv%,$(uname_M)))
29 ifeq ($(uname_S),Linux)
35 # To get ARM stack traces if Redis crashes we need a special C flag.
36 -ifneq (,$(filter aarch64 armv,$(uname_M)))
37 +ifneq (,$(filter aarch64 armv%,$(uname_M)))
38 CFLAGS+=-funwind-tables
40 -ifneq (,$(findstring armv,$(uname_M)))
41 +ifneq (,$(filter armv%,$(uname_M)))
42 CFLAGS+=-funwind-tables
45 @@ -121,7 +119,7 @@ FINAL_LIBS=-lm
48 # Linux ARM32 needs -latomic at linking time
49 -ifneq (,$(findstring armv,$(uname_M)))
50 +ifneq (,$(filter armv%,$(uname_M)))