QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2293|回复: 2

安装gcc-2.95.3时候的问题安装gcc-2.95.3的

[复制链接]
发表于 2006-8-6 22:07:45 | 显示全部楼层 |阅读模式
安装gcc-2.95.3的时候根据资料,打完补丁,用如下命令进行configure:

$../gcc-2.95.3/configure --target=$TARGET --prefix=$PREFIX \
>--without-headers --enable-languages=c --disable-threads

其中的$TARGET是arm-linux,configure之后通过,
但是make all-gcc或者是直接make,或者make bootstrap都出现错误:

gcc -c -DCROSS_COMPILE -DIN_GCC -g -DHAVE_CONFIG_H -I. -I. -I./config -I./../include ./config/arm/arm.c
./config/arm/arm.c: 在函数 ‘arm_override_options’ 中:
./config/arm/arm.c:286: 警告: assignment discards qualifiers from pointer target type
./config/arm/arm.c:530: 错误: 赋值运算中的左值无效
make[2]: *** [arm.o] 错误 1
make[2]: Leaving directory `/home/spirit/embedded/build-tools/gcc-2.95.3/gcc'
make[1]: *** [bootstrap] 错误 2
make[1]: Leaving directory `/home/spirit/embedded/build-tools/gcc-2.95.3/gcc'
make: *** [bootstrap] 错误 2
spirit@spirit-freeOS:~/embedded/build-tools/gcc-2.95.3$

因为它提示./config/arm/arm.c:530: 错误: 赋值运算中的左值无效,所以我将arm.c中的这行程序注释掉,但重新编译还是有新的错误出现!

请问大家这是怎么回事?谢谢
发表于 2006-8-13 03:29:34 | 显示全部楼层
你用的gcc是4。0以上吧,gcc4.0以上对c语法做的更严格的限制,
(type) val1 = val2;
被视为非法语法。
建议直接下载编译好的2。95。3
回复

使用道具 举报

 楼主| 发表于 2006-8-13 23:18:07 | 显示全部楼层
对!我用的是ubuntu6.06LTS操作系统,用自带的gcc版本为4.0.3
那再请教您一个问题,您知道gcc2.95.3源程序里面总有rtx这个类型,我不知道它是什么样的?您知道吗?它是个变量类型,结构体类型还是typedef定义的?谢谢您!:)
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-5-21 00:39 , Processed in 0.086314 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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