]> git.pld-linux.org Git - packages/redis.git/blob - arm-arch-check.patch
patch to make arm arch check more consistent
[packages/redis.git] / arm-arch-check.patch
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
5
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
8   included)
9 - filter match (broken due to lack of wildcard)
10 - substring match
11
12 Unifiy them all and settle for $(filter armv%,$(uname_M)) as most
13 generic and correct.
14 ---
15  src/Makefile | 10 ++++------
16  1 file changed, 4 insertions(+), 6 deletions(-)
17
18 diff --git a/src/Makefile b/src/Makefile
19 index fdfef2b3c..7334ab9d8 100644
20 --- a/src/Makefile
21 +++ b/src/Makefile
22 @@ -57,19 +57,17 @@ endif
23  
24  # Default allocator defaults to Jemalloc if it's not an ARM
25  MALLOC=libc
26 -ifneq ($(uname_M),armv6l)
27 -ifneq ($(uname_M),armv7l)
28 +ifeq (,$(filter armv%,$(uname_M)))
29  ifeq ($(uname_S),Linux)
30         MALLOC=jemalloc
31  endif
32  endif
33 -endif
34  
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
39  else
40 -ifneq (,$(findstring armv,$(uname_M)))
41 +ifneq (,$(filter armv%,$(uname_M)))
42          CFLAGS+=-funwind-tables
43  endif
44  endif
45 @@ -121,7 +119,7 @@ FINAL_LIBS=-lm
46  DEBUG=-g -ggdb
47  
48  # Linux ARM32 needs -latomic at linking time
49 -ifneq (,$(findstring armv,$(uname_M)))
50 +ifneq (,$(filter armv%,$(uname_M)))
51          FINAL_LIBS+=-latomic
52  endif
53  
54 -- 
55 2.37.3
56
This page took 0.09921 seconds and 3 git commands to generate.