gentoo/dev-db/redis/files/redis-7.2.0-system-jemalloc.patch
Petr Vaněk cc931041a6
dev-db/redis: add 7.2.0
Two patches were necessary to rebase, the *-shared.patch was renamed to
*-system-jemalloc.patch which better suits the change.

Boost-1.0 was appended to LICENSE because of newly bundled fpconv.

It is not necessary to append -DENABLE_CJSON_GLOBAL to cflags as it is
correctly set in deps/Makefile, thus flag-o-matic is no longer used.

-O2 is stripped from LUA_CLFAGS in order to respect user's CFLAGS.

The "big" sed for all Makefiles was revised, all expressions are moved
to a local mysedconf array, obsolete expressions are removed and it
newly strips recently appended -Werror* flags.

myconf is transformed to an array, with newly added OPTIMIZATION and
DEBUG_FLAGS defined as empty strings in order to respect user's CFLAGS.
USE_SYSTEMD is moved to the array as well.

github link is appended to HOMEPAGE.

Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
Closes: https://github.com/gentoo/gentoo/pull/32338
Signed-off-by: Sam James <sam@gentoo.org>
2023-08-17 07:22:36 +01:00

34 lines
879 B
Diff

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