zlib库交叉编译


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并没有以上错误


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM