LinuxSir.cn,穿越时空的Linuxsir!

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

请达人指点:建立交叉编译环境问题

[复制链接]
发表于 2006-6-22 18:35:07 | 显示全部楼层 |阅读模式
在红帽子9.0下安装cross-2.95.3,设置好path环境变量.测试编译arm-boot-1.1.0文件:
make smdk2410_config
然后 make   编译成功

测试编译u-boot-1.1.4文件:
make smdk2410_config
然后 make   则编译失败.出错信息如下
.......
strip bmp_logo
./bmp_logo logos/denx.bmp >/usr/local/arm/u-boot-1.1.4/include/bmp_logo.h
make[1]: Leaving directory `/usr/local/arm/u-boot-1.1.4/tools'
make -C examples all
make[1]: Entering directory `/usr/local/arm/u-boot-1.1.4/examples'
arm-linux-gcc -g -Os   -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float -D__KERNEL__ -DTEXT_BASE=0x33F80000 -I/usr/local/arm/u-boot-1.1.4/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/local/arm/2.95.3/lib/gcc-lib/arm-linux/2.95.3/include -pipe -DCONFIG_ARM -D__ARM__ -march=armv4 -mabi=apcs-gnu -Wall -Wstrict-prototypes -c -o hello_world.o hello_world.c
cc1: Invalid option `abi=apcs-gnu'
make[1]: *** [hello_world.o] Error 1
make[1]: Leaving directory `/usr/local/arm/u-boot-1.1.4/examples'
make: *** [examples] Error 2

不知道是什么原因引起的,请达人指点.
另外下载安装了eldk3.2.2交叉编译器,编译uboot和上面错误基本一样!
 楼主| 发表于 2006-6-23 12:38:43 | 显示全部楼层
难道我的问题太简单,大家都不屑回答吗?
我是个新手,请各位多多帮助!
回复 支持 反对

使用道具 举报

发表于 2006-6-23 18:50:29 | 显示全部楼层
用百度搜索“cc1: Invalid option `abi=apcs-gnu'”
其中一个链接为:郭步高的第一个BLOG
http://guobg.blogcn.com/

以下是他的解决方法,但是我没试过(!)你可以试试,或者找找其他链接。
如果还是不行就用google搜索。

2006-5-5

u-boot移植过程中abi=apcs-gnu问题的解决

以下摘自 http://sourceforge.net/mailarchive/message.php?msg

> I'm using the GCC 3.2 toolchain for building U-Boot (current head of git) for an ARM
target.
> I get the following error:
>    cc1: invalid option 'abi=apcs-gnu'
>
> This option (correct me if I'm wrong) was introduced with a recent
> patch by Peter Pearse.  Digging a bit in gcc.gnu.org it appears that
> this option comes only with GCC 4.0!

That's true but the cc-option checker should use -mapcs-32 if it is
available, otherwise it will fall back to -mabi=apcs-gnu. It looks
like your compiler doesn't support the first option either. In this
case, I'm not sure it worked before Peter's patch. What CPU is it?

You could try the following in your config.mk but you should
investigate why -mapcs-32 doesn't work:

PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call cc-option,-mabi=apcs-gnu,))

我使用的GCC为 arm-linux-gcc-3.4.1.tar.bz2
有效!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-7-3 12:33:00 | 显示全部楼层
谢谢这位兄弟了。问题解决了,就是这个原因
回复 支持 反对

使用道具 举报

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

本版积分规则

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