configure使用

交叉编译某个应用程序时,通常需要 ./configure 来生成对应的 Makefile ,然后make即可
./configure 最关键的三个选项是:

–host=HOST
指定软件运行的系统平台.如果没有指定,将会运行`config.guess’来检测.

–build=BUILD
指定软件包安装的系统平台.如果没有指定,默认值将是’–host’选项的值.

–target=GARGET
指定软件面向(target to)的系统平台.这主要在程序语言工具如编译器和汇编器上下文中起作用.如果没有指定,默认将使用’–host’选项的值.

一般而言,我们只要指定 –host 就可以了
记住:–host 指定的是交叉编译工具链的前缀

1.host system type not recognized
./configure --host=arm4-linux-gnueabihf
结果输出

checking host system type... Invalid configuration 'arm4-linux-gnueabihf': 'arm4-linux-gnueabihf' not recognized
解决办法

sudo apt-get install libtool
cp /usr/share/libtool/build-aux/config.sub .
cp /usr/share/libtool/build-aux/config.guess .

参考编译脚本

./configure --host=arm4-linux-gnueabihf
--prefix=/home/out
————————————————
版权声明:本文为CSDN博主「Robben.Han」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/hxlawf/article/details/89457048

有时候,不小心知道了一些事,才发现自己所在乎的事是那么可笑。
原文地址:https://www.cnblogs.com/axjlxy/p/15091703.html