编译GCC会耗尽内存

时间:2019-01-17 19:22:15

标签: gcc cross-platform ram

我正在尝试为c-sky架构(构建为在x86_64上运行)编译GCC工具链,一切都很好,只不过我一直在用尽内存。内存使用率一直在上升,直到我的swap和ram都用尽为止。我有54​​GB的交换空间和8GB的内存。但我应该这样做。但是它仍然崩溃。所以我的问题是,GCC真的需要那么多的ram来编译吗?由于它正在尝试使用超过60GB的ram / swap,所以!我可以做些什么来减少使用的内存吗?

以下是由于内存不足而导致崩溃的最后20行:

onfigure: WARNING: decimal float is not supported for this target, ignored
mkdir big/ck807/soft-fp
configure: WARNING: decimal float is not supported for this target, ignored
mkdir big/ck807/hard-fp
configure: WARNING: decimal float is not supported for this target, ignored
In file included from ../../.././gcc/tm.h:33:0,
                 from /home/tim/Downloads/toolchain-build-master/toolchain/source//gcc/libgcc/libgcc2.c:29:
/home/tim/Downloads/toolchain-build-master/toolchain/source//gcc/libgcc/libgcc2.c: In function '__clear_cache':
/home/tim/Downloads/toolchain-build-master/toolchain/source//gcc/libgcc/../gcc/config/csky/csky-abiv2-linux-elf.h:124:3: warning: implicit declaration of function 'cacheflush' [-Wimplicit-function-declaration]
   cacheflush (BEG, END-BEG, 3)
   ^
/home/tim/Downloads/toolchain-build-master/toolchain/source//gcc/libgcc/libgcc2.c:2131:3: note: in expansion of macro 'CLEAR_INSN_CACHE'
   CLEAR_INSN_CACHE (beg, end);
   ^~~~~~~~~~~~~~~~
xgcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [Makefile:467: _mulvdi3.o] Error 4
make[3]: *** [Makefile:1161: multi-do] Error 1
make[2]: *** [Makefile:120: all-multi] Error 2
make[1]: *** [Makefile:11036: all-target-libgcc] Error 2
make: *** [Makefile:858: all] Error 2

<-- end error output

exec command: export PATH=/home/tim/Downloads/toolchain-build-master/toolchain/install-csky-linux-gnuabiv2-glibc/bin/:$PATH;rm -rf ./* && /home/tim/Downloads/toolchain-build-master/toolchain/source//gcc/configure --target=csky-linux-gnuabiv2 --enable-shared       --with-sysroot=/home/tim/Downloads/toolchain-build-master/toolchain/install-csky-linux-gnuabiv2-glibc/csky-linux-gnuabiv2/libc/ --enable-languages=c    --disable-threads --disable-libssp --disable-libgomp --disable-libmudflap   --disable-libquadmath --disable-libatomic --disable-nls --without-headers --with-newlib  --prefix=/home/tim/Downloads/toolchain-build-master/toolchain/install-csky-linux-gnuabiv2-glibc/ && make && make install 

当内存不足时,它总是崩溃。这可能是错误吗?

谢谢!

0 个答案:

没有答案