Is gcc required to compile a unix vm?

Richard A. O'Keefe ok at atlas.otago.ac.nz
Thu Feb 8 00:01:02 UTC 2001


Stefan Matthias Aust <sma at 3plus4.de> wrote:

	Another question on Unix, especially Solaris:  Is there any chance to make 
	the source run with CC instead of GCC?  I was told that normally, Suns CC 
	generate code that runs twice as fast as GCC-generated SPARC code.

It all depends on the optimisation options you select.
Remember that gcc with no optimisation options generates really really dumb
code; the only time you should ever run gcc without -O2 is when you suspect
an optimiser bug.  If you compare

	cc -xO4
with
	gcc -O4

then the cc-generated code might be about 20% faster, NOT 2x.  At optimisation
level 5, cc wants a feedback file, to generate which you need realistic
benchmark data.  As far as I know gcc can't exploit profile feedback like that.





More information about the Squeak-dev mailing list