LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 3565|回复: 5

建立交叉编译工具链出现问题

[复制链接]
发表于 2007-6-21 16:20:40 | 显示全部楼层 |阅读模式
各位大虾:
小妹今天自行制作交叉编译器到gcc第一阶段出现如下编译错误,高手指点一二。/tmp/cclmWXr1.s: Assembler messages:
/tmp/cclmWXr1.s:33: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:34: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:35: Error: no such instruction: `stmfd sp!,{r4,r5,lr}'
/tmp/cclmWXr1.s:36: Error: no such instruction: `ldr r5,.L11'
/tmp/cclmWXr1.s:37: Error: no such instruction: `ldrb r3,[r5,'
/tmp/cclmWXr1.s:38: Error: expecting operand after ','; got nothing
/tmp/cclmWXr1.s:39: Error: no such instruction: `ldmnefd sp!,{r4,r5,pc}'
/tmp/cclmWXr1.s:40: Error: no such instruction: `ldr r4,.L11+4'
/tmp/cclmWXr1.s:41: Error: no such instruction: `b .L8'
/tmp/cclmWXr1.s:43: Error: no such instruction: `ldr r3,[r4,'
/tmp/cclmWXr1.s:44: Error: too many memory references for `add'
/tmp/cclmWXr1.s:45: Error: invalid char '[' beginning operand 2 `[r4'
/tmp/cclmWXr1.s:46: Error: too many memory references for `mov'
/tmp/cclmWXr1.s:47: Error: too many memory references for `mov'
/tmp/cclmWXr1.s:49: Error: no such instruction: `ldr r3,[r4,'
/tmp/cclmWXr1.s:50: Error: no such instruction: `ldr r2,[r3,'
/tmp/cclmWXr1.s:51: Error: expecting operand after ','; got nothing
/tmp/cclmWXr1.s:52: Error: no such instruction: `bne .L10'
/tmp/cclmWXr1.s:53: Error: expecting operand after ','; got nothing
/tmp/cclmWXr1.s:54: Error: invalid char '[' beginning operand 2 `[r5'
/tmp/cclmWXr1.s:55: Error: no such instruction: `ldmfd sp!,{r4,r5,pc}'
/tmp/cclmWXr1.s:64: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:65: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:66: Error: invalid char '[' beginning operand 2 `[sp'
/tmp/cclmWXr1.s:69: Error: no such instruction: `bl __do_global_dtors_aux'
/tmp/cclmWXr1.s:72: Error: no such instruction: `ldr pc,[sp],'
/tmp/cclmWXr1.s:76: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:77: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:78: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:79: Error: no such instruction: `ldr r0,.L16'
/tmp/cclmWXr1.s:80: Error: no such instruction: `ldr r3,[r0,'
/tmp/cclmWXr1.s:81: Error: expecting operand after ','; got nothing
/tmp/cclmWXr1.s:82: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:83: Error: no such instruction: `moveq pc,lr'
/tmp/cclmWXr1.s:84: Error: no such instruction: `ldr r3,.L16+4'
/tmp/cclmWXr1.s:85: Error: expecting operand after ','; got nothing
/tmp/cclmWXr1.s:86: Error: no such instruction: `moveq pc,lr'
/tmp/cclmWXr1.s:87: Error: no such instruction: `b _Jv_RegisterClasses'
/tmp/cclmWXr1.s:96: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:97: Error: junk at end of line, first unrecognized character is `@'
/tmp/cclmWXr1.s:98: Error: invalid char '[' beginning operand 2 `[sp'
/tmp/cclmWXr1.s:101: Error: no such instruction: `bl frame_dummy'
/tmp/cclmWXr1.s:104: Error: no such instruction: `ldr pc,[sp],'
make[1]: *** [crtbegin.o] 错误 1
make[1]: Leaving directory `/home/arm/dev_home/btools/tchain3.4.4/BUILD/gcc-3.4.4-stage1/gcc'
make: *** [all-gcc] 错误 2
发表于 2007-7-10 09:08:01 | 显示全部楼层
你的做法说的不太清楚阿。但是像37行,80行等等明显是指令使用发生的错误。我也自己做过交叉编译的工具链,但是像一些教科书上写的那样作就太复杂了。你可以参考一下我的做法:
http://hi.baidu.com/yangyingchao ... 803095a4c272b2.html
回复 支持 反对

使用道具 举报

发表于 2007-8-1 16:44:28 | 显示全部楼层
可能是本地gcc版本与编译gcc版本不匹配
回复 支持 反对

使用道具 举报

发表于 2007-8-3 16:24:04 | 显示全部楼层

使用crosstool很方便就能完成

使用crosstool脚本可以完成交叉编译

关于工具的话题可以参考这个帖子
http://forum.linuxbj.com/modules ... c_id=10&forum=4
讲软浮点工具链的
回复 支持 反对

使用道具 举报

发表于 2007-8-12 20:56:59 | 显示全部楼层
交叉工具链!我做了4天,遇到了无数问题,主要就是出自于GCC的
有没有一个比较匹配的版本套餐推荐一下?
回复 支持 反对

使用道具 举报

发表于 2007-10-30 09:39:45 | 显示全部楼层
Post by desertwolf2050
交叉工具链!我做了4天,遇到了无数问题,主要就是出自于GCC的
有没有一个比较匹配的版本套餐推荐一下?


很多啊。
CROSSTOOL官方网站上面的包里面提供了很多选择。
自己看看就知道了。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表