summaryrefslogtreecommitdiff
path: root/dev-db/redis/files/redis-7.2.0-system-jemalloc.patch
blob: cc2c51a50ea96ce34e1941928a7c8e767e89d33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Rebased from original redis-5.0-shared.patch

diff --git a/src/Makefile b/src/Makefile
index ecbd2753d..275446338 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -65,10 +65,7 @@ PYTHON := $(shell which python3 || which python)
 endif
 
 # Default allocator defaults to Jemalloc on Linux and libc otherwise
-MALLOC=libc
-ifeq ($(uname_S),Linux)
-	MALLOC=jemalloc
-endif
+MALLOC?=jemalloc
 
 # To get ARM stack traces if Redis crashes we need a special C flag.
 ifneq (,$(filter aarch64 armv%,$(uname_M)))
@@ -266,9 +263,8 @@ ifeq ($(MALLOC),tcmalloc_minimal)
 endif
 
 ifeq ($(MALLOC),jemalloc)
-	DEPENDENCY_TARGETS+= jemalloc
-	FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
-	FINAL_LIBS := ../deps/jemalloc/lib/libjemalloc.a $(FINAL_LIBS)
+	FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE
+	FINAL_LIBS+= -ljemalloc -ldl
 endif
 
 # LIBSSL & LIBCRYPTO
-- 
2.41.0