Question

I try to compile an old program (which was compiled by cc) using gcc. In the makefile there is one line like this:

CFLAGS = -O2 -Olimit 2000 -w

There is no '-Olimit 2000' in gcc. I am wondering what does it really mean. Whether it is safe to just delete this option when using gcc.

Was it helpful?

Solution

As far as I can tell, this was only supported by IRIX's C compiler. I can't even find a solid reference as to what it was used for. Since it doesn't do anything with GCC, its definitely safe to remove it.

A little more detail, it was used to disable optimization on routines that were larger than the "Olimit". This limit is to make it so the amount of time doing optimization is limited. If you specify 0 for the Olimit, it means an "infinite Olimit" and will optimization every routine. Here's a man page for MIPSpro: http://cimss.ssec.wisc.edu/~gumley/modis/old/mips_64.pdf

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top