QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1675|回复: 8

编译GCC-2.95.3出现的问题

[复制链接]
发表于 2006-3-21 15:21:38 | 显示全部楼层 |阅读模式
我用的READHAT9
配置为着../configure --target=..../arm-linux --prefix=/home/.... --without-headers --enable-languages=c --disable-threads

make时出现下面错误 请高手 帮忙 谢谢 了
_udivsi3
libgcc1.S: Assembler messages:
libgcc1.S:1: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:2: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:71: Error: no such instruction: `dividend .req r0'
libgcc1.S:72: Error: no such instruction: `divisor .req r1'
libgcc1.S:73: Error: no such instruction: `result .req r2'
libgcc1.S:74: Error: no such instruction: `curbit .req r3'
libgcc1.S:75: Error: no such instruction: `ip .req r12'
libgcc1.S:76: Error: no such instruction: `sp .req r13'
libgcc1.S:77: Error: no such instruction: `lr .req r14'
libgcc1.S:78: Error: no such instruction: `pc .req r15'
libgcc1.S:86: Error: expecting operand after ','; got nothing
libgcc1.S:87: Error: no such instruction: `beq Ldiv0'
libgcc1.S:88: Error: expecting operand after ','; got nothing
libgcc1.S:89: Error: expecting operand after ','; got nothing
libgcc1.S:90: Error: too many memory references for `cmp'
libgcc1.S:91: Error: no such instruction: `bcc Lgot_result'
libgcc1.S:93: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:94: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:95: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:96: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:97: Error: expecting operand after ','; got nothing
libgcc1.S:98: Error: no such instruction: `cmpcc divisor,dividend'
libgcc1.S:99: Error: no such instruction: `movcc divisor,divisor,lsl'
libgcc1.S:100: Error: no such instruction: `movcc curbit,curbit,lsl'
libgcc1.S:101: Error: no such instruction: `bcc Loop1'
libgcc1.S:104: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:105: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:106: Error: expecting operand after ','; got nothing
libgcc1.S:107: Error: no such instruction: `cmpcc divisor,dividend'
libgcc1.S:108: Error: no such instruction: `movcc divisor,divisor,lsl'
libgcc1.S:109: Error: no such instruction: `movcc curbit,curbit,lsl'
libgcc1.S:110: Error: no such instruction: `bcc Lbignum'
libgcc1.S:113: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:114: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:115: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:116: Error: junk at end of line, first unrecognized character is `@'
libgcc1.S:117: Error: too many memory references for `cmp'
libgcc1.S:118: Error: no such instruction: `subcs dividend,dividend,divisor'
libgcc1.S:119: Error: no such instruction: `orrcs result,result,curbit'
libgcc1.S:120: Error: too many memory references for `cmp'
libgcc1.S:121: Error: no such instruction: `subcs dividend,dividend,divisor,lsr'libgcc1.S:122: Error: no such instruction: `orrcs result,result,curbit,lsr'
libgcc1.S:123: Error: too many memory references for `cmp'
libgcc1.S:124: Error: no such instruction: `subcs dividend,dividend,divisor,lsr'libgcc1.S:125: Error: no such instruction: `orrcs result,result,curbit,lsr'
libgcc1.S:126: Error: too many memory references for `cmp'
libgcc1.S:127: Error: no such instruction: `subcs dividend,dividend,divisor,lsr'libgcc1.S:128: Error: no such instruction: `orrcs result,result,curbit,lsr'
libgcc1.S:129: Error: expecting operand after ','; got nothing
libgcc1.S:130: Error: no such instruction: `movnes curbit,curbit,lsr'
libgcc1.S:131: Error: no such instruction: `movne divisor,divisor,lsr'
libgcc1.S:132: Error: no such instruction: `bne Loop3'
libgcc1.S:134: Error: too many memory references for `mov'
libgcc1.S:135: Error: too many memory references for `mov'
libgcc1.S:138: Error: invalid char '[' beginning operand 2 `[sp'
libgcc1.S:139: Error: no such instruction: `bl __div0 (PLT)'
libgcc1.S:140: Error: expecting operand after ','; got nothing
libgcc1.S:141: Error: no such instruction: `ldmia sp!,{pc}'
make[1]: *** [libgcc1-asm.a] 错误 1
make[1]: Leaving directory `/home/hillson/project/build-tools/build-boot-gcc/gcc'
make: *** [all-gcc] 错误 2
发表于 2006-3-21 15:49:59 | 显示全部楼层
Not sure what is going on for your case, at least you should provide enough information for others ...

Anyway, you may these following two sites to get your ARM toolchain.

http://www.kegel.com/crosstool/

http://www.codesourcery.com/gnu_toolchains/arm/download.html
回复

使用道具 举报

 楼主| 发表于 2006-3-21 16:14:12 | 显示全部楼层
oh
I want to build a ARM Toolchain .
I tried to use:

linux-2.4.21+rmk2
binutils-2.10.1
gcc-2.95.3
glibc-2.2.3
glibc-linuxthreads-2.2.3


binutils compiles successfully.Then,I begin configuring gcc-2.95.3,which seems no problem.
But when I make, some errors take place :

can you help me ? thanks
回复

使用道具 举报

发表于 2006-3-21 16:19:28 | 显示全部楼层
why using "--target=..../arm-linux " ??

Do you ever take a look at the website I provide to you? The kegel is the most famous toolchain website, you might find the one you need.

If not, you may try

   cd gcc-2.95.2
   ./configure --target=arm-linux --prefix=<CROSSDIR>
   make LANGUAGES=c
   make LANGUAGES=c install

http://www.simplescalar.com/v4test.html
回复

使用道具 举报

 楼主| 发表于 2006-3-21 16:40:05 | 显示全部楼层
why using "--target=..../arm-linux " ??

-target=$TARGET TARGET 指向的是arm-linux

我看了 你也介绍的那个 网站
我只是想自己动手建一个工具链
我是按照BUILDING EMBEDDED LINUX SYSTEMS 一书中的叙述 一步步作的人 但不知道为什么会出现问题
谢谢你的回答
回复

使用道具 举报

发表于 2006-3-21 16:45:45 | 显示全部楼层
I don't think --target=...../arm-linux is correct.

Another problem is that you maybe mess up the directory. You may refer to the link of simplescalar I gave you before.
回复

使用道具 举报

 楼主| 发表于 2006-3-21 16:56:57 | 显示全部楼层
我输出如下的环境变量:
$export PRJROOT=/home/dyl/embedded
$export TARGET=arm-linux
$export PREFIX=$PRJROOT/tools
$export TARGET_PREFIX=$PREFIX/$TARGET
$export PATH=$PREFIX/bin:$PATH

编译 GCC 使用
../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX --without-headers --enable-languages=c --disable-threads

初次弄这个 很多都不懂 谢谢你耐心回答
回复

使用道具 举报

发表于 2006-3-21 17:07:03 | 显示全部楼层
Do you also put your binutils to the directory of $PREFIX? Please refer to the document of SimpleScalar, which has the detailed informaiton about this.
回复

使用道具 举报

 楼主| 发表于 2006-3-21 17:12:47 | 显示全部楼层
恩` 正在看  
binutils的
../binutils-2.10.1/configure --target=$TARGET --prefix=$PREFIX

我是完全按照书上写的操作的  不知道怎么会还有这么多问题  真是郁闷
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-11-23 12:42 , Processed in 0.111394 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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