[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] gcc 4.2.2 compile error



Olivier.Landemarre@utbm.fr wrote :
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.

I'm pretty sure that the solution is here.
I remember that it has worked for me on some cases.
Note that to turn off the optimization, the option is -O0 (capital O and zero). Another option is to remove -O2.

When make fails, the GCC command line is displayed some lines above.
Then it is possible to copy/paste that command line, alter the options as necessary, and execute it from the shell.
If it works, you can type make and the build continues !

A note about GCC 4: it is true that today it sometimes produces a code worse than previous versions. However, his architecture is better, so in the future it will produce the best code. The memory problems are know bugs, they will be fixed in the next release. Now, we just have to find workarounds to compile (exceptional) problematic files. And usually the solution is to disable optimization for that file.

--
Vincent Rivière