]> git.pld-linux.org Git - packages/redis.git/commitdiff
patch to make arm arch check more consistent
authorJan Palus <atler@pld-linux.org>
Sat, 3 Sep 2022 16:35:16 +0000 (18:35 +0200)
committerJan Palus <atler@pld-linux.org>
Sat, 3 Sep 2022 16:35:16 +0000 (18:35 +0200)
arm-arch-check.patch [new file with mode: 0644]
redis.spec

diff --git a/arm-arch-check.patch b/arm-arch-check.patch
new file mode 100644 (file)
index 0000000..be45bc9
--- /dev/null
@@ -0,0 +1,56 @@
+From 2ad19f9492fa21ea733f191a38b379ca31f4657d Mon Sep 17 00:00:00 2001
+From: Jan Palus <jpalus@fastmail.com>
+Date: Sat, 3 Sep 2022 18:27:24 +0200
+Subject: [PATCH] Make ARM arch check more consistent
+
+There are three different type of checks if build is for ARM:
+- exact (ifneq0 match for only armv6 and armv7 (arm < 6 not being
+  included)
+- filter match (broken due to lack of wildcard)
+- substring match
+
+Unifiy them all and settle for $(filter armv%,$(uname_M)) as most
+generic and correct.
+---
+ src/Makefile | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index fdfef2b3c..7334ab9d8 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -57,19 +57,17 @@ endif
+ # Default allocator defaults to Jemalloc if it's not an ARM
+ MALLOC=libc
+-ifneq ($(uname_M),armv6l)
+-ifneq ($(uname_M),armv7l)
++ifeq (,$(filter armv%,$(uname_M)))
+ ifeq ($(uname_S),Linux)
+       MALLOC=jemalloc
+ endif
+ endif
+-endif
+ # To get ARM stack traces if Redis crashes we need a special C flag.
+-ifneq (,$(filter aarch64 armv,$(uname_M)))
++ifneq (,$(filter aarch64 armv%,$(uname_M)))
+         CFLAGS+=-funwind-tables
+ else
+-ifneq (,$(findstring armv,$(uname_M)))
++ifneq (,$(filter armv%,$(uname_M)))
+         CFLAGS+=-funwind-tables
+ endif
+ endif
+@@ -121,7 +119,7 @@ FINAL_LIBS=-lm
+ DEBUG=-g -ggdb
+ # Linux ARM32 needs -latomic at linking time
+-ifneq (,$(findstring armv,$(uname_M)))
++ifneq (,$(filter armv%,$(uname_M)))
+         FINAL_LIBS+=-latomic
+ endif
+-- 
+2.37.3
+
index 7d9a888228776932cbdb7088d53fda377caaddbd..3ee5a25755a9fa4abcb8e018d59ee757f532d523 100644 (file)
@@ -25,6 +25,7 @@ Source3:      %{name}.tmpfiles
 Patch0:                %{name}.conf.patch
 Patch1:                %{name}-tcl.patch
 Patch2:                0001-1st-man-pageis-for-redis-cli-redis-benchmark-redis-c.patch
+Patch3:                arm-arch-check.patch
 URL:           http://www.redis.io/
 %{?with_perftools:BuildRequires:    gperftools-devel}
 BuildRequires: jemalloc-static
@@ -77,6 +78,7 @@ disk.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 # Remove integration tests
 %{__sed} -i -e '/    integration\/replication/d' tests/test_helper.tcl
This page took 0.647079 seconds and 4 git commands to generate.