我按照该贴http://blog.chinaunix.net/u1/34474/showart_361474.html,在FC11建立交叉编译环境,使用的交叉编译器最新的组合为
gcc-4.1.1
cgcc-3.3.6
glibc-2.3.2
binutils-2.16.1
linux-2.6.29.4
hdrs-2.6.12.0
在编译时出现错误如下:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for pwd... /bin/pwd
checking for arm-9tdmi-linux-gnu-gcc... gcc
checking version of gcc... 4.4.0, bad
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
configure: error:
*** These critical programs are missing or too old: gcc
*** Check the INSTALL file for required versions.
请问下这是什么原因?该怎么解决?谢谢各位了~!
iamxzg 于 2009-09-20 00:11:41发表:
第一种方案有结果了,DONE如期而至,大家看一下:
testhello: C compiler can in fact build a trivial program.
+ test '' = 1
+ test '' = 1
+ test '' = 1
+ test 1 = ''
+ echo Done.
Done.
可是我还是心有不安,因为在编译过程中,我看到许多“错误”和“警告”。
iamxzg 于 2009-09-19 23:00:54发表:
谢谢微宝贝,但我还是想自己动手,看到该贴的各位高人,希望你们能继续给我提供方案,谢谢了,这样也能帮助后面很多遇到该问题的人。
我的网上搜索到两种方案:
1、对crosstool-0.43/patches/glibc-2.3.2/glibc-2.3.3-allow-gcc-4.0-configure.patch进行了修改,将+ 3.[2-9]*|4.[01]*)改为+ 3.[2-9]*|4.*)。我刚这么改了,现在还正在编译,似乎编译时间比以前多几个倍了,不过终端在快速闪动的过程中,我发现了许多“错误”二字,最终结果如何,呆会揭晓。
2、引起这种错误并非GCC版本太老,反而是因为太新,这得委屈FC11降低GCC版本了,将它的GCC-4.4.0降为GCC-4.1.1。我还没试,试了知道。
现在还不知道之两种方案成功率有多大,希望您能帮我分析下,若另有高招,谢谢提出,感激不尽。
微宝贝 于 2009-09-19 21:37:23发表:
下载完了,解压都/usr/local然后添加环境变量就行了
微宝贝 于 2009-09-19 21:35:47发表:
有现成的,你去下载个就行了。友善之臂的就不错。
http://www.arm123.com.cn/linux/arm-linux-gcc-4.3.2.tgz