1.21版本中使用的ncruse5.9和gcc最新版本不兼容,很奇怪的bug,有人向gcc提交过,但是没找到patch,就这样。
安装过程没什么好讲的,按提示一步步来。
以下是官网的建议,很简单吧!
If you decide to use a released version (replace VERSION with the actual version you choose; the latest version is listed at the top of this page):
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-VERSION.tar.bz2
tar xjf crosstool-ng-VERSION.tar.bz2
cd crosstool-ng-VERSION
./configure –prefix=/some/place
make
make install
export PATH=”${PATH}:/some/place/bin”
Then, you are ready to use crosstool-NG.
create a place to work in, then list the existing samples (pre-configured toolchains that are known to build and work) to see if one can fit your actual needs. Sample names are 4-part tuples, such as arm-unknown-linux-gnueabi. In the following, we'll use that as a sample name; adapt to your needs:
mkdir /a/directory/to/build/your/toolchain
cd /a/directory/to/build/your/toolchain
ct-ng help
ct-ng list-samples
ct-ng show-arm-unknown-linux-gnueabi
once you know what sample to use, configure ct-ng to use it:
ct-ng arm-unknown-linux-gnueabi
samples are configured to install in "${HOME}/x-tools/arm-unknown-linux-gnueabi" by default. This should be OK for a first time user, so you can now build your toolchain:
ct-ng build
finally, you can set access to your toolchain, and call your new cross-compiler with :
export PATH=”
PATH:
{HOME}/x-tools/arm-unknown-linux-gnueabi/bin”
arm-unknown-linux-gnueabi-gcc
Of course, replace arm-unknown-linux-gnueabi with the actual sample name you choose! ;-)
“`
不要用ct-ng的下载安装,自己找安装包放置目录。
4核编译,速度还挺快的。