可以从官网http://www.zlib.net/找到源码包http://www.zlib.net/zlib-1.2.11.tar.gz,下载最新的源码包
export PATH="/opt/hisi-linux/x86-arm/aarch64-himix100-linux/bin:$PATH";
export CC=aarch64-himix100-linux-gcc;
export AR=aarch64-himix100-linux-ar;
export RANLIB=aarch64-himix100-linux-ranlib;
./configure --prefix=/home/zlib --shared
出现错误:Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
在configure 删除以下字段,避免将warn处理为error :
echo "Checking for obsessive-compulsive compiler options..." >> configure.log
if try $CC -c $CFLAGS $test.c; then
:
else
echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
leave 1
fi