c++ - Compiling GCC 4.x.x on MinGW / MSYS Fails -
i've been attempting last week or compile of gcc 4 series of compilers run in mingw 5.1.6 / msys 1.0.11 (automated installers both sourceforge.org) ships gcc version 3.4.5. end goal gcc 4.5 install, haven't been able of 4.x.x compilers build.
i've narrowed down sequence of build instructions result in unusual behavior. compiler executes:
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
the main problem seems call genmodes.exe. builds c file (insn-modes.c) that's 2gb in size , which, far can tell filled whitespace (though there scattered here , there occassional line of c code). gcc 3.4.5 chokes on , that's how build ends. similar behavior exhibited in of versions i've tried, except 4.5, fails other reasons hoping cured using intermediate version of compiler.
so, 3 questions:
- has else experienced this?
- what's causing it?
- what, if workaround exists?
i'm trying on 64-bit windows 7 machine.
thanks.
update: i've uploaded compressed copy of 2 suspect files this location. turns out min-insn-modes.c larger should be. 2 files (over 3gb total) compress 121kb.
insn-modes.c should not gigantic or filled whitespace; genmodes malfunctioning. don't know why fail way, i'd curious have @ insn-modes.c (if put in .zip file should shrink down point can reasonably upload somewhere , edit url question).
manually stripping whitespace out of file (tr -s ' \r\n\t\v\f' ' '
) may can compiled.
edit: looked @ min-insn-modes.c uploaded, , think bryan right, there's bug in tagged_printf
: every time it's called, it's emitting 7 million space characters. bryan's change should past hurdle, or investigate little further changing definition this:
#define tagged_printf(fmt, arg, tag) { \ int count_ = printf (" " fmt ",", arg); \ printf ("\t/* %s [%d], */\n", tag, count_); \ } while (0)
that should make build succeed, , i'd see min-insn-modes.c change made. (no need insn-modes.c well.)
addition: please take emit_insn_modes_h() function. contains printf %n specifier needs modified above:
int count_ = printf (" %smode,", m->name);
without change insn-modes.h gets filled huge amount of spaces.
Comments
Post a Comment