我将其缩小为一系列构建说明,导致一些不寻常的行为。编译器执行以下操作:
build/genmodes.exe > tmp-modes.c
/bin/sh ../../gcc-4.2.4/gcc/../move-if-change tmp-modes.c insn-modes.c
echo timestamp > s-modes
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.2.4/gcc -I../../gcc-4.2.4/gcc/.
-I../../gcc-4.2.4/gcc/../include -I./../intl -I../../gcc-4.2.4/gcc/../libcpp/include
-I../../gcc-4.2.4/gcc/../libdecnumber -I../libdecnumber insn-modes.c -o insn-modes.o
cc1.exe: out of memory allocating 2239725803 bytes
make[3]: *** [insn-modes.o] Error 1
make[3]: Leaving directory `/home/root/gcc-4.2.4-build/gcc'
make[2]: *** [all-stage1-gcc] Error 2
make[2]: Leaving directory `/home/root/gcc-4.2.4-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/root/gcc-4.2.4-build'
make: *** [all] Error 2
主要问题似乎是对genmodes.exe的调用。它会生成一个约2GB大小的C文件(insn-modes.c),据我所知,该文件主要由空格填充(尽管偶尔有一些C代码行)。GCC 3.4.5在此处出现故障,并以此结束构建。我尝试过所有版本,都出现了类似的情况,除了4.5版本,但其失败原因希望通过使用编译器的中间版本来解决。
所以,三个问题:
- 还有其他人遇到过这个问题吗?
- 是什么导致了这个问题?
- 如果有的话,是否存在任何解决方法?
我正在尝试在64位Windows 7机器上完成这个操作。
谢谢。
更新:我已将两个可疑文件的压缩副本上传到this location.。结果发现min-insn-modes.c也比它应该的大小要大。这两个文件(总计超过3GB)压缩后为121KB。