[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] gcc 4.2.2 compile error
Selon MiKRO <miro.kropacek@gmail.com>:
> > I don't think C compilation takes that much memory, but I've seen a mention
> > on debian builds that some specific package with C++ code may need
> > half a gig.
> >
> Unfortunately, Vincent is right. "Simple" C file, regex.c (in
> libierty) has 8200 lines and it seems this is the problem. After
> reading that bug reports from gnu bugzilla there were many reports
> that long C files can go far beyond 1 GB, there was even example of
> source code which eats more than 16 (!) GB memory.
>
> To summarize it, I've tried that stack command, it didn't help. Btw
> strange thing -- is there any limit for the stack? I set 4 MB for that
> xgcc and I've got memory violation as soon as some compilation
> involved (configure script "checking if gcc works"), same for 512K
> (and this even occured in gcc 2.95!). So the safest boundary seems to
> be 256K?.
>
> When I'll be at home, I'll try to disable that -O2 with regex.c,
> hopefully it helps. Maybe would be good to think about porting the
> latest 3.x gcc instead of 4.x. I remember there were many complaints
> in linux world gcc 4.x is even slower and less effective to produce
> code than 3.x...
>
>
I know a bug in gcc generally avaible on BSD ports, some long file with an
enumeration of functions (like a big list of opengl function (I have this sort
of code)), then the optimizer crash probably with a stack overflow. Solution is
quite simple add -o0 as optimisation flag and then it's ok.
Olivier
> --
> MiKRO / Mystic Bytes
> http://mikro.atari.org
>
>
>
--