From 41d8f344a3ca70577eb1716a47b5c9901392eba4 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Wed, 27 Mar 2019 15:39:12 +0800 Subject: [PATCH] Fix redis building on Linux and disable its usage of epoll --- Makefile | 2 -- redis/Makefile | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cf6ddb6..cdcb487 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,6 @@ endif endif redis: -ifeq ($(redis), on) ifneq ($(arch), riscv64) ifneq ($(shell uname), Darwin) mkdir -p $(out_dir) @@ -89,7 +88,6 @@ ifneq ($(shell uname), Darwin) @cp redis/build/$(arch)/redis-cli $(out_dir)/redis-cli endif endif -endif build: rust ucore biscuit $(busybox) nginx redis diff --git a/redis/Makefile b/redis/Makefile index 985e8a9..169fce8 100644 --- a/redis/Makefile +++ b/redis/Makefile @@ -10,6 +10,9 @@ bin_server := build/$(arch)/redis-server bin_cli_unstripped := build/$(arch)/redis-cli-unstripped bin_cli := build/$(arch)/redis-cli +# $ARCH is also used in redis internal Makefile, avoid clashing +undefine ARCH + $(redis_tarball_path): wget http://download.redis.io/releases/$(redis_tarball) -O $(redis_tarball_path) @@ -18,6 +21,8 @@ $(redis_dir): $(redis_tarball_path) cd $(build_dir) && tar xvf ../../$(redis_tarball_path) $(redis_dir)/src/redis-server: $(redis_dir) + # we do not support epoll at the time + sed -i 's/#define HAVE_EPOLL 1//' $(redis_dir)/src/config.h cd $(redis_dir) && make CC=$(cc) MALLOC=libc $(bin_server_unstripped): $(redis_dir)/src/redis-server