LinuxSir.cn,穿越时空的Linuxsir!

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

建立交叉编译环境出错

[复制链接]
发表于 2008-7-17 15:48:13 | 显示全部楼层 |阅读模式
我用的版本是
binutils-2.14.tar.bz2
gcc-3.3.2.tar.bz
glibc-2.2.5.tar.bz2
glibc-linuxthreads-2.2..5.tar.bz2
我用的命令为:.../configure  -target =arm-linux  -prefix=/usr/local/arm/3.3.2 -disable-shared -disable-threads -enable-languages="c"
在编译到gcc 出现下列错误
make[1]: Entering directory `/root/cross/gcc-3.3.2/arm-linux/libiberty'
make[2]: Entering directory `/root/cross/gcc-3.3.2/arm-linux/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/root/cross/gcc-3.3.2/arm-linux/libiberty/testsuite'
make[1]: Leaving directory `/root/cross/gcc-3.3.2/arm-linux/libiberty'
make[1]: Entering directory `/root/cross/gcc-3.3.2/arm-linux/gcc'
echo "/* This file is machine generated.  Do not edit.  */" > tmp-gtyp.h
echo "static const char *srcdir = "  >> tmp-gtyp.h
echo "\"../../gcc\"" >> tmp-gtyp.h
echo ";" >> tmp-gtyp.h
echo "static const char *lang_files[] = {" >> tmp-gtyp.h
ll="../../gcc/c-lang.c  ../../gcc/c-parse.in  ../../gcc/c-tree.h  ../../gcc/c-decl.c  ../../gcc/c-common.c  ../../gcc/c-common.h  ../../gcc/c-pragma.c  ../../gcc/c-objc-common.c "; \
        for f in $ll; do \
        echo "\"$f\", "; done >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
echo "static const char *langs_for_lang_files[] = {" >> tmp-gtyp.h
ff="c  c  c  c  c  c  c  c "; \
        for f in $ff; do \
        echo "\"$f\", " ; done  >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
echo "static const char *all_files[] = {" >> tmp-gtyp.h
gf="config.h auto-host.h ../../gcc/../include/ansidecl.h ../../gcc/config/dbxelf.h ../../gcc/config/elfos.h ../../gcc/config/arm/unknown-elf.h ../../gcc/config/arm/elf.h ../../gcc/config/arm/aout.h ../../gcc/config/arm/arm.h ../../gcc/config/arm/linux-gas.h ../../gcc/config/arm/linux-elf.h ../../gcc/defaults.h ../../gcc/defaults.h ../../gcc/location.h ../../gcc/../include/hashtab.h ../../gcc/bitmap.h ../../gcc/function.h  ../../gcc/rtl.h ../../gcc/optabs.h ../../gcc/tree.h ../../gcc/libfuncs.h ../../gcc/hashtable.h ../../gcc/real.h ../../gcc/varray.h ../../gcc/ssa.h ../../gcc/insn-addr.h ../../gcc/cselib.h ../../gcc/c-common.h ../../gcc/c-tree.h ../../gcc/basic-block.h ../../gcc/alias.c ../../gcc/bitmap.c ../../gcc/cselib.c ../../gcc/dwarf2out.c ../../gcc/emit-rtl.c ../../gcc/except.c ../../gcc/explow.c ../../gcc/expr.c ../../gcc/fold-const.c ../../gcc/function.c ../../gcc/gcse.c ../../gcc/integrate.c ../../gcc/lists.c ../../gcc/optabs.c ../../gcc/profile.c ../../gcc/ra-build.c ../../gcc/regclass.c ../../gcc/reg-stack.c ../../gcc/sdbout.c ../../gcc/stmt.c ../../gcc/stor-layout.c ../../gcc/tree.c ../../gcc/varasm.c ../../gcc/config/arm/arm.c ../../gcc/c-lang.c ../../gcc/c-parse.in ../../gcc/c-tree.h ../../gcc/c-decl.c ../../gcc/c-common.c ../../gcc/c-common.h ../../gcc/c-pragma.c ../../gcc/c-objc-common.c"; \
        for f in $gf; do \
        echo "\"$f\", "; done >> tmp-gtyp.h
echo " NULL};" >> tmp-gtyp.h
echo "static const char *lang_dir_names[] = { \"c\", " >> tmp-gtyp.h
gf=""; \
        for l in $gf; do \
        echo "\"$l\", "; done >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
/bin/sh ../../gcc/move-if-change tmp-gtyp.h gtyp-gen.h
gtyp-gen.h is unchanged
gcc -c  -Dinhibit_libc -D_gthr_posix_h -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long   -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/config -I../../gcc/../include ../../gcc/read-rtl.c -o read-rtl.o
In file included from ../../gcc/read-rtl.c:25:
../../gcc/rtl.h:132: 警告:位段类型 ‘code’ 是一个 GCC 扩展
../../gcc/rtl.h:135: 警告:位段类型 ‘mode’ 是一个 GCC 扩展
../../gcc/read-rtl.c: In function ‘fatal_with_file_and_line’:
../../gcc/read-rtl.c:53: 警告:传统 C 不接受 ISO C 风格的函数定义
../../gcc/read-rtl.c: In function ‘read_rtx’:
../../gcc/read-rtl.c:653: 错误:自增运算中的左值无效
make[1]: *** [read-rtl.o] 错误 1
make[1]: Leaving directory `/root/cross/gcc-3.3.2/arm-linux/gcc'
make: *** [all-gcc] 错误 2
[root@localhost arm-linux]#
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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