LinuxSir.cn,穿越时空的Linuxsir!

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

Cross-Compiled Linux From Scratch - Embedded SVN-0.0.1-20070214-arm 生成交叉编

[复制链接]
发表于 2007-4-6 09:38:06 | 显示全部楼层 |阅读模式
版本:Cross-Compiled Linux From Scratch - Embedded - Version SVN-0.0.1-20070214-arm

问题点:6.8. Cross GCC-4.1.2 - Static

现象: 在进行最小gcc编译时,出现下面的错误,请达人指点

/home/wj/CLFS_embedded/build/gcc-build/./gcc/xgcc -B/home/wj/CLFS_embedded/build/gcc-build/./gcc/ -B/home/wj/CLFS_embedded/mnt/cross-tools/arm-unknown-linux-uclibc/bin/ -B/home/wj/CLFS_embedded/mnt/cross-tools/arm-unknown-linux-uclibc/lib/ -isystem /home/wj/CLFS_embedded/mnt/cross-tools/arm-unknown-linux-uclibc/include -isystem /home/wj/CLFS_embedded/mnt/cross-tools/arm-unknown-linux-uclibc/sys-include -O2 -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc-4.1.2/gcc -I../../gcc-4.1.2/gcc/. -I../../gcc-4.1.2/gcc/../include -I../../gcc-4.1.2/gcc/../libcpp/include   -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time   \
          -c ../../gcc-4.1.2/gcc/crtstuff.c -DCRT_BEGIN \
          -o crtbegin.o
/tmp/ccFDaaea.s: Assembler messages:
/tmp/ccFDaaea.s:68: Error: cannot represent BFD_RELOC_32 relocation in this object file format
/tmp/ccFDaaea.s:69: Error: cannot represent BFD_RELOC_32 relocation in this object file format
/tmp/ccFDaaea.s:101: Error: cannot represent BFD_RELOC_32 relocation in this object file format
/tmp/ccFDaaea.s:102: Error: cannot represent BFD_RELOC_32 relocation in this object file format
/tmp/ccFDaaea.s:35: Error: cannot represent BFD_RELOC_32 relocation in this object file format
/tmp/ccFDaaea.s:78: Error: cannot represent BFD_RELOC_ARM_PCREL_BRANCH relocation in this object file format
/tmp/ccFDaaea.s:111: Error: cannot represent BFD_RELOC_ARM_PCREL_BRANCH relocation in this object file forma
发表于 2007-4-6 21:55:42 | 显示全部楼层
我编译CLFS Embedded for mips 的时候,
按照book上的命令在编译uclibc-header 和 uclibc时也遇到错误,编译失败。
(难道大家都没问题吗?)
后来自己根据uclibc的makefile修改了命令,才通过的。
你的问题我不清楚是什么,但CLFS有可能是有错误的。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-9 09:15:03 | 显示全部楼层
编译ulibc-header的时候最后一步有错误,应该将make PREFIX=${CLFS} install改为make PREFIX=${CLFS} install_dev。
请问楼上的在编译Cross GCC-4.1.2 - Static 的时候没有出问题么?
回复 支持 反对

使用道具 举报

发表于 2007-4-9 11:41:07 | 显示全部楼层
我在编译Cross GCC-4.1.2 - Static时很顺利,没有出问题
回复 支持 反对

使用道具 举报

发表于 2007-4-10 20:08:58 | 显示全部楼层
建议重做一下binutils试试看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-12 21:26:02 | 显示全部楼层
嗯,我开始也觉得是bfd有问题,全部重做了一遍还是这个问题,唉,很恼火啊
回复 支持 反对

使用道具 举报

发表于 2007-4-13 09:39:24 | 显示全部楼层
我觉得选一个
和是的宿主很重要

我用 livecd -6.2.3 做宿主

按照 svn-sysroot x86 2007-0311

基本可以成功

不知道是不是你宿主的哪个软件版本的问题导致

我用 linux 7.3
linux 9.0 做宿主时,总有这样那样的问题
回复 支持 反对

使用道具 举报

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

本版积分规则

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