交叉编译的./configure选项?

问题描述:

据我所知,./configure脚本是用GNU Autoconf生成的.我完全不了解Autoconf.这些工具如何工作?如何使用此./configure脚本制作要交叉编译的源代码?

As far as I know, ./configure script is generated with GNU Autoconf. I don't know about Autoconf at all. How do these tools work, and how can I use this ./configure script to make source to cross-compile?

这是一篇很好的小文章,介绍如何交叉编译:

This is a pretty good little article to read on how to cross-compile: http://linux.bytesex.org/cross-compiler.html.

交叉编译的主要部分是为编译器设置配置标志,以定位到目标体系结构和平台:

The main part in cross-compiling is setting the configure flags for the compiler to poinst to the target architecture and platform:

./configure --target=sparc-linux --with-gnu-as i486-redhat-linux

这可能已经过时了(该文章的修改后的复制和粘贴),但是相同的概念仍然适用.

This might be outdated (modified copy & paste from that article), but the same concept still applies.