[MLton] building mlton for darwin + intel
fluet at tti-c.org
Thu Feb 22 13:39:44 PST 2007
> Just wanted to let you know that the mlton build you provided seems to
> be working just fine on my Macinteltosh. Lots o' source files, and mllex
> and mlyacc as well. Pretty dern'd cool.
> But I also wanted to clarify my earlier question about dynamically
> linking to gmp. My question was not just about whether folks considered
> gmp ubiquitous enough, but why mlton the compiler needs it at all. Does
> it actually use IntInf internally?
Absolutely. At a minimum, one would want to use IntInf to perform
constant folding of IntInf operations. In MLton, we use IntInf also to
uniformly represent integer and word constants of all sizes. There are
also places in the Basis Library implementation that use IntInf; for
example, representing Time.time values with nanosecond precision.
> I was also going to ask why it needed
> libgmp.3.dylib specifically instead fo libgmp.so or libgmp.la (which I
> assume is just a different name for .so), but I held back until I get
> farther into the mechanics of building mlton executables.
This is just a representation dictated by the platform; MLton itself
doesn't really care how the GMP library is represented. We just invoke
gcc with '-lgmp' to perform linking.
On MacOSX, they use the Mach-O binary format, whose dynamically linked
library extension is .dylib. The .la file is not a binary; it is a text
file (a libtool library file, according to the header).
More information about the MLton