You need to sign in or sign up before continuing.
Commit 9ada818b authored by antirez's avatar antirez
Browse files

Fix modules compilation when libc malloc is used.

Compiling Redis worked as a side effect of jemalloc target specifying
-ldl as needed linker options, otherwise it is not provided during
linking and dlopen() API will remain unresolved symbols.
parent 381651fa
...@@ -55,7 +55,7 @@ endif ...@@ -55,7 +55,7 @@ endif
FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -I../deps/geohash-int FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) -I../deps/geohash-int
FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG)
FINAL_LIBS=-lm FINAL_LIBS=-lm -ldl
DEBUG=-g -ggdb DEBUG=-g -ggdb
ifeq ($(uname_S),SunOS) ifeq ($(uname_S),SunOS)
...@@ -95,7 +95,7 @@ endif ...@@ -95,7 +95,7 @@ endif
ifeq ($(MALLOC),jemalloc) ifeq ($(MALLOC),jemalloc)
DEPENDENCY_TARGETS+= jemalloc DEPENDENCY_TARGETS+= jemalloc
FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include
FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a
endif endif
REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment