源码:lighttpd-1.4.73.tar.gz
lighttpd 依赖 pcre ,需先交叉编译 pcre
Step 1:解压
tar -xvzf lighttpd-1.4.73.tar.gz
cd lighttpd-1.4.73/
Step 2:创建安装目录
mkdir arm_lighttpd
Step 3:CMake 生成 makefile
创建编译目录
mkdir build
cd build/
新建文件 aarch64.cmake,添加如下内容
SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
SET(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
CMake 生成 makefile
cmake ../ -DCMAKE_TOOLCHAIN_FILE=./aarch64.cmake -DCMAKE_INSTALL_PREFIX=/home/xi/share/release/gcc_7.5.0_aarch64/3rdparty/lighttpd-1.4.73/arm_lighttpd
Step 4:编译安装
make
make install