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