= RunningOnSparc

MLton runs fine on the Sparc architecture.

== Notes

* When compiling for Sparc, MLton targets the 32-bit Sparc
architecture (i.e., Sparc V8).

* When compiling for Sparc, MLton doesn't support native code
generation (`-codegen native`).  Hence, performance is not as good as
it might be and compile times are longer.  Also, the quality of code
generated by `gcc` is important.  By default, MLton calls `gcc -O1`.
You can change this by calling MLton with `-cc-opt -O2`.  We have seen
this speed up some programs by as much as 30%, especially those
involving floating point; however, it can also more than double
compile times.

* When compiling for Sparc, MLton uses `-align 8` by default.  While
this speeds up reals, it also may increase object sizes.  If your
program does not make significant use of reals, you might see a
speedup with `-align 4`.

== Known issues

* Bootstrapping on the <<RunningOnSparc#,Sparc architecture>> is so slow
as to be impractical (many hours on a 500MHz UltraSparc).  For this
reason, we strongly recommend building with a
<<CrossCompiling#,cross compiler>>.

== Also see

* <<RunningOnSolaris#>>
