LinuxSir.cn,穿越时空的Linuxsir!

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

问一个交叉编译的问题

[复制链接]
发表于 2007-7-17 11:32:50 | 显示全部楼层 |阅读模式
我在RedHat 9.0上进行交叉编译,目标系统是arm9的开发板。
我使用的编译器是开发板配套光盘中给的。
armv4l-unknown-linux-gcc
我要实现对一个程序叫做pure-ftpd的ftp服务器的移植。
由于这个程序configure后会生成好多个Makefile,一个个改太烦,所以,我想修改configue的CC参数,我这么写:
./configure --host=/opt/host/armv4l/bin/armv4l-unknown-linux CC=/opt/host/armv4l/bin/armv4l-unknown-linux-gcc
然后,configure在执行中给出这样的报错信息:
……
checking whether snprintf is C99 conformant ...
configure: error: can not run test
See 'config.log' for more details.
然后在config.log中的相关信息如下
configure:18813: result: no
configure:18824: checking whether statvfs64() is defined
configure:18858: /opt/host/armv4l/bin/armv4l-unknown-linux-gcc -c -g -O2  -D_GNU_SOURCE=1 -I/usr/kerberos/include conftest.c >&5
configure:18864: $? = 0
configure:18868: test -z
                        ||test ! -s conftest.err
configure:18871: $? = 0
configure:18874: test -s conftest.o
configure:18877: $? = 0
configure:18880: result: yes
configure:18899: checking whether snprintf is C99 conformant
configure:18903: error: cannot run test program while cross compiling
See `config.log' for more details.
这个问题我也不知道该发到哪个板块上去,希望高手给我帮助
指明一个方向
谢谢!
发表于 2007-7-17 13:04:51 | 显示全部楼层
先把交叉工具链所在的 bin 目录加入 PATH,然后注意 --host=arm-linux 仔细看看 ./configure --help
回复 支持 反对

使用道具 举报

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

本版积分规则

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