[MLton-user] mlton on sparc-solaris10 ?

Florian Weimer fw@deneb.enyo.de
Fri, 04 Nov 2005 10:52:50 +0100


* Stephen Weeks:

> I just cross-compiled all our regressions, dropping -fcall-used, and
> ran them on a Solaris 10 machine.  They all passed.  So, I'm confident
> that this was the only problem.  As to why this option causes
> problems, I'd be happy to be enlightened by some
> Solaris/gcc/linker/whatever expert.

I'm no such expert, but:

%g7 is used for threading.  Starting with Solaris 10, the system
libraries are always thread-enabled, so %g7 is reserved even if you do
not explicitly use threads.

There are some details at:

<http://developers.sun.com/solaris/articles/sparcv9abi.html>

Apparently, GCC (or binutils?) does not implement the register usage
pseudo-instruction, otherwise this would have resulted in a link-time
error, and not a crash at run time.