Chinaunix首页 | 论坛 | 博客
  • 博客访问: 241537
  • 博文数量: 88
  • 博客积分: 1429
  • 博客等级:
  • 技术积分: 523
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-18 15:31
文章分类

全部博文(88)

文章存档

2017年(2)

2016年(24)

2013年(1)

2012年(24)

2011年(15)

2010年(22)

我的朋友

分类: LINUX

2010-03-24 21:28:30

 
 
(这绝对是一个好blog)
 
整个过程是按照上面的做的,但会出现一个问题:
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.3.2, 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.
 
然后找到下面的网页:

crosstool的目录中通常包含了我们常见问题的patch。

进入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.6.30.4,也是一次编译成功。。。不过还不知道能不能用。。。
 
成功后的信息:
kernel 2.6.22
......
+ /home/juruqiang/work/cross/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-gcc -static hello.c -o arm-9tdmi-linux-gnu-hello-static
+ /home/juruqiang/work/cross/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-gcc hello.c -o arm-9tdmi-linux-gnu-hello
+ test -x /home/juruqiang/work/cross/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-g++
+ cat
+ /home/juruqiang/work/cross/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-g++ -static hello2.cc -o arm-9tdmi-linux-gnu-hello2-static
+ /home/juruqiang/work/cross/crosstool/gcc-4.1.0-glibc-2.3.2/arm-9tdmi-linux-gnu/bin/arm-9tdmi-linux-gnu-g++ hello2.cc -o arm-9tdmi-linux-gnu-hello2
+ echo testhello: C compiler can in fact build a trivial program.
testhello: C compiler can in fact build a trivial program.
+ test '' = 1
+ test '' = 1
+ test '' = 1
+ test 1 = ''
+ echo Done.
Done.
[juruqiang@jonny arm-9tdmi-linux-gnu]$ ls
arm-9tdmi-linux-gnu  arm-9tdmi-linux-gnu.crosstoolconfig.txt  bin  distributed  include  info  lib  libexec  man  share  tmp
 
 
阅读(698) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:yum

给主人留下些什么吧!~~