打印
[嵌入式linux]

arm-linux-gcc 3.4.4 安装

[复制链接]
3591|8
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
jxlxq|  楼主 | 2009-4-7 23:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
大家好,最近我在安装arm-linux-gcc遇到了一个问题,被难住了,请各位指教!



---
在编译gcc第一阶段时,
make all-gcc 时,遇到了gcc好像无法识别编译arm汇编指令的现象,其提示如下:

/root/Desktop/ctools/BUILD/gcc-3.4.4-stage1/gcc/xgcc -B/root/Desktop/ctools/BUILD/gcc-3.4.4-stage1/gcc/ -B/usr/local/arm/3.4.4/arm-linux/bin/ -B/usr/local/arm/3.4.4/arm-linux/lib/ -isystem /usr/local/arm/3.4.4/arm-linux/include -isystem /usr/local/arm/3.4.4/arm-linux/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../../gcc-3.4.4/gcc -I../../../gcc-3.4.4/gcc/. -I../../../gcc-3.4.4/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time \
-c ../../../gcc-3.4.4/gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
/tmp/cc1OVxCs.s: Assembler messages:
/tmp/cc1OVxCs.s:36: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:37: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:38: Error: no such instruction: `stmfd sp!,{r4,r5,lr}'
/tmp/cc1OVxCs.s:39: Error: no such instruction: `ldr r5,.L12'
/tmp/cc1OVxCs.s:40: Error: no such instruction: `ldrb r3,[r5,'
/tmp/cc1OVxCs.s:41: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:42: Error: no such instruction: `ldmnefd sp!,{r4,r5,pc}'
/tmp/cc1OVxCs.s:43: Error: no such instruction: `ldr r4,.L12+4'
/tmp/cc1OVxCs.s:44: Error: no such instruction: `b .L9'
/tmp/cc1OVxCs.s:46: Error: no such instruction: `ldr r3,][r4,'
/tmp/cc1OVxCs.s:47: Error: too many memory references for `add'
/tmp/cc1OVxCs.s:48: Error: invalid char '][' beginning operand 2 `][r4'
/tmp/cc1OVxCs.s:49: Error: too many memory references for `mov'
/tmp/cc1OVxCs.s:50: Error: too many memory references for `mov'
/tmp/cc1OVxCs.s:52: Error: no such instruction: `ldr r3,][r4,'
/tmp/cc1OVxCs.s:53: Error: no such instruction: `ldr r2,][r3,'
/tmp/cc1OVxCs.s:54: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:55: Error: no such instruction: `bne .L11'
/tmp/cc1OVxCs.s:56: Error: no such instruction: `ldr r3,.L12+8'
/tmp/cc1OVxCs.s:57: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:58: Error: no such instruction: `ldrne r0,.L12+12'
/tmp/cc1OVxCs.s:59: Error: no such instruction: `movne lr,pc'
/tmp/cc1OVxCs.s:60: Error: no such instruction: `movne pc,r3'
/tmp/cc1OVxCs.s:62: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:63: Error: invalid char '][' beginning operand 2 `][r5'
/tmp/cc1OVxCs.s:64: Error: no such instruction: `ldmfd sp!,{r4,r5,pc}'
/tmp/cc1OVxCs.s:75: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:76: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:77: Error: invalid char '][' beginning operand 2 `][sp'
/tmp/cc1OVxCs.s:80: Error: no such instruction: `bl __do_global_dtors_aux'
/tmp/cc1OVxCs.s:83: Error: no such instruction: `ldr pc,][sp],'
/tmp/cc1OVxCs.s:89: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:90: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:91: Error: no such instruction: `ldr r3,.L18'
/tmp/cc1OVxCs.s:92: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:93: Error: invalid char '[' beginning operand 2 `][sp'
/tmp/cc1OVxCs.s:94: Error: no such instruction: `ldr r0,.L18+4'
/tmp/cc1OVxCs.s:95: Error: no such instruction: `ldr r1,.L18+8'
/tmp/cc1OVxCs.s:96: Error: no such instruction: `movne lr,pc'
/tmp/cc1OVxCs.s:97: Error: no such instruction: `movne pc,r3'
/tmp/cc1OVxCs.s:99: Error: no such instruction: `ldr r0,.L18+12'
/tmp/cc1OVxCs.s:100: Error: no such instruction: `ldr r3,][r0,'
/tmp/cc1OVxCs.s:101: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:102: Error: no such instruction: `ldreq pc,][sp],'
/tmp/cc1OVxCs.s:103: Error: no such instruction: `ldr r3,.L18+16'
/tmp/cc1OVxCs.s:104: Error: expecting operand after ','; got nothing
/tmp/cc1OVxCs.s:105: Error: no such instruction: `ldreq pc,[sp],'
/tmp/cc1OVxCs.s:106: Error: no such instruction: `ldr lr,[sp],'
/tmp/cc1OVxCs.s:107: Error: no such instruction: `b _Jv_RegisterClasses'
/tmp/cc1OVxCs.s:119: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:120: Error: junk at end of line, first unrecognized character is `@'
/tmp/cc1OVxCs.s:121: Error: invalid char '[' beginning operand 2 `][sp'
/tmp/cc1OVxCs.s:124: Error: no such instruction: `bl frame_dummy'
/tmp/cc1OVxCs.s:127: Error: no such instruction: `ldr pc,][sp],'
make[1]: *** [crtbegin.o] 错误 1
make[1]: Leaving directory `/root/Desktop/ctools/BUILD/gcc-3.4.4-stage1/gcc'
make: *** [all-gcc] 错误 2

请问各位有什么办法解决这个问题,谢谢先!

相关帖子

沙发
wangkj| | 2009-4-7 23:27 | 只看该作者

看www.openembed.org

使用特权

评论回复
板凳
jxlxq|  楼主 | 2009-4-8 00:05 | 只看该作者

It's ok

  ok了.

使用特权

评论回复
地板
jxlxq|  楼主 | 2009-4-8 01:02 | 只看该作者

下一个问题


在编译完整gcc时出现问题:

: make
其现象如下:
ibgcc/./_paritydi2.o libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o libgcc/./_udiv_w_sdiv.o libgcc/./_udivmoddi4.o  libgcc/./unwind-dw2.o libgcc/./unwind-dw2-fde-glibc.o libgcc/./unwind-sjlj.o libgcc/./gthr-gnat.o libgcc/./unwind-c.o; echo %%; \
          cat ../../../gcc-3.4.4/gcc/libgcc-std.ver ../../../gcc-3.4.4/gcc/config/libgcc-glibc.ver \
            | sed -e '/^[   ]*#/d' \
                  -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
            | /root/Desktop/ctools/BUILD/gcc-3.4.4/gcc/xgcc -B/root/Desktop/ctools/BUILD/gcc-3.4.4/gcc/ -B/usr/local/arm/3.4.4//bin/ -B/usr/local/arm/3.4.4//lib/ -isystem /usr/local/arm/3.4.4//include -isystem /usr/local/arm/3.4.4//sys-include -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fomit-frame-pointer -fPIC -g0 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../../gcc-3.4.4/gcc -I../../../gcc-3.4.4/gcc/. -I../../../gcc-3.4.4/gcc/../include   -E -xassembler-with-cpp -; \
        } | gawk -f ../../../gcc-3.4.4/gcc/mkmap-symver.awk  > libgcc/./tmp-libgcc.map
/bin/sh: -nm: command not found
No symbols seen -- broken or mis-installed nm?
make[2]: *** [libgcc/./libgcc.map] 错误 1
make[2]: Leaving directory `/root/Desktop/ctools/BUILD/gcc-3.4.4/gcc'
make[1]: *** [stmp-multilib] 错误 2
make[1]: Leaving directory `/root/Desktop/ctools/BUILD/gcc-3.4.4/gcc'
make: *** [all-gcc] 错误 2
[root@localhost gcc-3.4.4]# 

请各位描描先,谢谢。

使用特权

评论回复
5
jxlxq|  楼主 | 2009-4-9 22:47 | 只看该作者

-nm


 /bin/sh: -nm: command not found , -nm是啥意思呀???

使用特权

评论回复
6
msleep| | 2009-4-11 12:42 | 只看该作者

没有那个指令

使用特权

评论回复
7
jxlxq|  楼主 | 2009-4-12 15:04 | 只看该作者

没搞明白,编译就通过了

出现了上述问题,但我重启计算机后,再make all-gcc,不知道为什么又通过了.

使用特权

评论回复
8
ascroll| | 2013-8-14 00:28 | 只看该作者
我想问一下你的问题是怎么解决的,因为我也遇到这个问题了。就是 no such instruction: 的那个,谢谢。

使用特权

评论回复
9
HORSE7812| | 2013-9-26 12:04 | 只看该作者
学习

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

10

主题

43

帖子

0

粉丝