[MLton-devel] mGTK for MLton status
Stephen Weeks
sweeks@sweeks.com
Sat, 16 Aug 2003 06:43:45 -0700
> Sorry for being so slow to send you any feedback, but I'm handing my
> PhD dissertation 1/9. Everything else has been put on hold.
No problem. Good luck with finishing your thesis.
> The bad new is that it works with my oldish MLton CVS check-out but
> not with the mlton in Debian sarge. It seems that MLton barf on the
> output from pkg-config when I try to execute:
>
> mlton -output helloworld-mlton -verbose 1 helloworld-mlton.cm \
> mgtk-mlton.o `pkg-config --libs gtk+-2.0`
>
> Any suggestions on how to change things?
The problem is that as of 20030716, MLton now checks the command line
to ensure that all arguments after the file are of the form -l*, -L*,
*.a or *.o. This was done to catch errors where people mistakenly put
MLton switches after the file that were ignored by MLton and passed to
the linker, with almost certainly unintended results.
On Debian sarge, the pkg-config call includes "-Wl,--export-dynamic"
in its output. That is certainly a valid linker flag. I've checked
in a fix to the cvs to cause MLton to accept the "-Wl," prefix on
linker args. But I'm wondering if there isn't a better way, since
there are likely other possibilities output from pkg-config --libs
that we need to handle. Does anyone know if this is the case? Any
thoughts on the right thing to do?
Until you can use a fixed MLton, you can drop the
"-Wl,--export-dynamic" from the pkg-config result and explicitly add
it as a MLton arg via -cc-opt -Wl,--export-dynamic. That will
generate a warning due to the unused linker arg when MLton calls gcc,
but will generate working executables.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel