PCRE 8.42:
1. ./configure CC=arm-nuvoton-linux-uclibceabi-gcc --host=arm-nuvoton-linux-uclibceabi --prefix=/home/zxy/mywork/pcre
2. make
3. make install
ZLIB 1.2.11:
1. ./configure --prefix=/home/zxy/mywork/zlib
2. 修改Makefile中的编译器名称CC,AR, TAR,LDSHARED 以arm-nuvoton-linux-uclibceabi-开头
3. make
4. sudo make install
nginx 1.14.0
1.
./configure \
--prefix=/home/zxy/mywork/nginx \
--with-zlib=../zlib-1.2.11 \
--with-pcre \
--with-pcre=../pcre-8.42 \
--with-pcre-jit \
--with-cc-opt="-I /usr/local/arm_linux_4.2/include" \
--with-ld-opt="-L /usr/local/arm_linux_4.2/lib"
2. 修改Makefile
CC = arm-nuvoton-linux-uclibceabi-gcc
CFLAGS = -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g
CPP = arm-nuvoton-linux-uclibceabi-gcc -E
LINK = $(CC)
../pcre-8.42/Makefile: /home/cust/web/nginx/build/Makefile
cd ../pcre-8.42 \
&& if [ -f Makefile ]; then $(MAKE) distclean; fi \
&& CC="$(CC)" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
./configure --disable-shared --host=arm-nuvoton-linux-uclibceabi --prefix=/home/zxy/mywork/pcre
3. make
src/core/ngx_config.h
添加
#define TCP_FASTOPEN 23
//src/core/ngx_open_file_cache.h
添加
#ifndef AT_EMPTY_PATH
#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
#endif
#ifndef AT_EMPTY_PATH
#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
#endif
#ifndef O_PATH
#define O_PATH 010000000
#endif
objs/ngx_auto_config.h 中注释掉
/*
#ifndef NGX_HAVE_ACCEPT4
#define NGX_HAVE_ACCEPT4 1
#endif
*/
注释
/*
#ifndef NGX_HAVE_PWRITEV
#define NGX_HAVE_PWRITEV 1
#endif
*/
/* by zxy
#ifndef NGX_HAVE_GNU_CRYPT_R
#define NGX_HAVE_GNU_CRYPT_R 1
#endif
*/
spawn-fcgi 1.6.3:
1. spawn-fcgi是fastcgi进程管理器
$ ./configure
2. //修改Makefile中的编译器 CC CPP 有2个Makefile还有一个在src目录下
3. make
4. ./src/spawn-fcgi 就是目标