zlib-1.2.11
開發板:arm9
交叉編譯器arm-fsl-linux-gnueabihf-gcc
編譯方式:
./configure -h可以發現zlib並沒有提供CC配置,所以
(1)export CC=arm-fsl-linux-gnueabihf-gcc
(2)./configure --prefix=/opt/libz
出現錯誤:Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
解決方案參考http://blog.csdn.net/hzh_beyond/article/details/40074081
在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
另外,后來使用arm-linaro-linux-gnueabihf-gcc並沒有以上錯誤