1.进入redis/deps目录,交叉编译依赖库
#!/bin/bash
#ARCH设置为空很重要,否则报错 error: arm: No such file or directory
ARCH=""
CC=$CROSS_COMPILE\gcc
CXX=$CROSS_COMPILE\g++
STRIP=$CROSS_COMPILE\strip
RANLIB=$CROSS_COMPILE\ranlib
OBJDUMP=$CROSS_COMPILE\objdump
NM=$CROSS_COMPILE\nm
LD=$CROSS_COMPILE\ld
AR=$CROSS_COMPILE\ar
AS=$CROSS_COMPILE\as
#make MALLOC=Jemalloc
make hiredis linenoise lua CC=$CC \
CC=$CROSS_COMPILE\gcc \
CXX=$CROSS_COMPILE\g++ \
STRIP=$CROSS_COMPILE\strip \
RANLIB=$CROSS_COMPILE\ranlib \
OBJDUMP=$CROSS_COMPILE\objdump \
NM=$CROSS_COMPILE\nm \
LD=$CROSS_COMPILE\ld \
AR=$CROSS_COMPILE\ar \
AS=$CROSS_COMPILE\as