[MLton-user] mlton-20070826 on mingw
Matthew Fluet
fluet at tti-c.org
Mon Dec 17 08:55:00 PST 2007
On Mon, 17 Dec 2007, Bernard Berthomieu wrote:
>> > When building applications then, one has no other choice than that made
>> > for building libmlton.a,
>> > unless the two possible versions of libmlton.a are bundled with mlton
>> > : -(
>> You should be able to re-compile the runtime system (yielding a new
>> libmlton.a) without needing to re-compile the compiler itself. If you
>> have a gmp.h/libgmp.a pair that corresponds to a GMP configured as a
>> static library, then you could download the MLton sources, and then
>> execute 'make dirs runtime' and copy the resulting
>> '<src>/build/lib/self/libmlton.a' (along with libgmp.a) to
>> '/mingw/lib/mlton/self'. You'll still need a libgmp-3.dll around to run
>> the compiler itself, but the resulting executables should be statically
>> linked to GMP.
>
> Confirmed. I'm not sure the differences between the static and dynamic
> versions
> of gmp.h are relevant here, but the way mlton is built definitely is.
>
> Using mingw with gcc4 and the available mlton distribution (and slight
> updates of
> runtime/platform/mingw.{h|c}), I could rebuild both variants of mlton last
> week:
>
> - one that links gmp dynamically, equivalent to that available for download,
> and
> that does not allow one to link gmp statically with applications;
>
> - one that links gmp statically. I can't figure out why exactly but,
> interestingly, this
> version allows one to link gmp either statically or dynamically with
> applications.
>
> Both seem to work. I think it would be a good idea to make the "static"
> version
> available for download too as, so far, I can only see advantages in using it
> rather
> than the "dynamic" version.
If you have a 'static' version available, upload it to TemporaryUpload and
I'll move it to Experimental.
More information about the MLton-user
mailing list