各位大牛帮帮忙!!!
我在搭建交叉编译环境的编译gcc步骤时遇到了一个奇怪的问题(如下):
[root@wdy arm-linux]# make
make[1]: Entering directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/libiberty'
make[2]: Entering directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/libiberty/testsuite'
make[1]: Leaving directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/libiberty'
make[1]: Entering directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/gcc'
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:24:
../../gcc/rtl.h:132: 警告:位段类型‘code’是一个 GCC 扩展
../../gcc/rtl.h:135: 警告:位段类型‘mode’是一个 GCC 扩展
../../gcc/read-rtl.c: 在函数‘fatal_with_file_and_line’中:
../../gcc/read-rtl.c:52: 警告:传统 C 不接受 ISO C 风格的函数定义
../../gcc/read-rtl.c: 在函数‘read_rtx’中:
../../gcc/read-rtl.c:653: 错误:自增操作数必须是左值
make[1]: *** [read-rtl.o] 错误 1
make[1]: Leaving directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/gcc'
make: *** [all-gcc] 错误 2
[root@wdy arm-linux]# make install
/bin/sh ../mkinstalldirs /usr/local/arm/3.3.2 /usr/local/arm/3.3.2
make[1]: Entering directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/gcc'
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:24:
../../gcc/rtl.h:132: 警告:位段类型‘code’是一个 GCC 扩展
../../gcc/rtl.h:135: 警告:位段类型‘mode’是一个 GCC 扩展
../../gcc/read-rtl.c: 在函数‘fatal_with_file_and_line’中:
../../gcc/read-rtl.c:52: 警告:传统 C 不接受 ISO C 风格的函数定义
../../gcc/read-rtl.c: 在函数‘read_rtx’中:
../../gcc/read-rtl.c:653: 错误:自增操作数必须是左值
make[1]: *** [read-rtl.o] 错误 1
make[1]: Leaving directory `/home/wdy/cross/scource/gcc-3.3.2/arm-linux/gcc'
make: *** [install-gcc] 错误 2
且其中的t-linux文件已经加入了 "-Dinhibit_libc -D_gthr_posix_h"和“T_CFLAGS = -Dinhibit_libc -D_gthr_posix_h”
多谢各位大牛帮帮我解决一下!感激不禁!!!
wilkinsun 于 2011-09-21 13:13:44发表:
楼主,这个问题得到解决了吗?我也遇到同样问题了,望前辈分享经验啊:0)1