From f27309af533398f408c48453d4bb86bc07483ffd Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Mon, 22 Apr 2019 10:59:29 +0800 Subject: [PATCH 1/2] Enable redis static build --- redis/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redis/Makefile b/redis/Makefile index c25e3d2..53d7c88 100644 --- a/redis/Makefile +++ b/redis/Makefile @@ -32,7 +32,7 @@ $(redis_dir)/src/redis-server: $(redis_dir)/src/config.h # our accept does not have backlog sed -i 's/#define MAX_ACCEPTS_PER_CALL 1000/#define MAX_ACCEPTS_PER_CALL 1/' $(redis_dir)/src/networking.c # note: on some platforms gcc seems to forget linking with libatomic, fix it anyway - cd $(redis_dir) && make CC=$(cc) LDFLAGS="${LDFLAGS} -latomic" MALLOC=libc + cd $(redis_dir) && make CC=$(cc) LDFLAGS="${LDFLAGS} -latomic -static" MALLOC=libc $(bin_server_unstripped): $(redis_dir)/src/redis-server cp $(redis_dir)/src/redis-server $(bin_server_unstripped) From 532c7c25584ce07f0701d2fd68ddd72486314abf Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Mon, 22 Apr 2019 11:16:49 +0800 Subject: [PATCH 2/2] Fix redis building on mipsel --- redis/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redis/Makefile b/redis/Makefile index 53d7c88..2e42614 100644 --- a/redis/Makefile +++ b/redis/Makefile @@ -32,7 +32,8 @@ $(redis_dir)/src/redis-server: $(redis_dir)/src/config.h # our accept does not have backlog sed -i 's/#define MAX_ACCEPTS_PER_CALL 1000/#define MAX_ACCEPTS_PER_CALL 1/' $(redis_dir)/src/networking.c # note: on some platforms gcc seems to forget linking with libatomic, fix it anyway - cd $(redis_dir) && make CC=$(cc) LDFLAGS="${LDFLAGS} -latomic -static" MALLOC=libc + sed -i 's/-ldl -pthread -lrt/-ldl -pthread -lrt -latomic/' $(redis_dir)/src/Makefile + cd $(redis_dir) && make CC=$(cc) LDFLAGS="${LDFLAGS} -static" MALLOC=libc $(bin_server_unstripped): $(redis_dir)/src/redis-server cp $(redis_dir)/src/redis-server $(bin_server_unstripped)