[MLton] add-cross no longer uses a cross compiler

Anoq of the Sun anoq@HardcoreProcessing.com
Tue, 18 Nov 2003 20:48:18 +0200


Stephen Weeks wrote:
> Yes, we can do this if you need.  If you are unable to work with the
> new script, feel free to use the old one, and once you get a setup
> that works, mail it and I will add it back via a switch.

Thanks a lot :)

> But it
> sounds like from your other mails that you might be able to get a gcc
> and ssh working on Windows/MinGW.

ssh, yes. But I prefer using gcc with cross-compiling. Otherwise I would
need a native Windows installation of at least Cygwin (maybe just GNUmake?),
gcc, gmp and maybe others. And I had problems with Cygwin on NT.

Doing everything as a cross-compile from Linux seems easier (at least
since I already got GCC working). Also I did the cross gmp (and even
cross SDL when I get that far) before but not the native ones.

> I would guess that if anyone is doing cross development, then they
> must have the machine they are compiling to so they can test their
> program.

In the old MLton-days I used a partitioned HD and rebooting ;)
Actually the 2 games "ABC Expedition" and "The Unlimited Game" were
done that way :)

> In any case, the old script suffered from the same problems
> in that it required to be able to ssh to the target machine and run a
> program.  The new problem that this script adds is that it requires a
> gcc on the target machine.

Yes, that's true. The ideal would be to also be able to do this in
steps manually. But I don't require that right now. Maybe if
someone has the need the script could be easily enhanced to support this.

> To be clear, I have not changed (and am not proposing to change) how
> people use MLton for cross development.  They can still use a cross
> gcc if they want.  What I have changed is how people build MLton for
> new targets.

Isn't the add-cross script also to enable cross-compilation in the
first place, since it builds the MLton runtime for cross-compilation?
If you have these prebuilt on your website there is no need for
people to install the native Windows gcc (for example) to do
cross-compilation. But if people are installing from sources
for cross-compilation they would need a native gcc first before
they can do cross-compilation. Or did I miss something?

> I have eliminated the the requirement for a cross gcc
> and added a requirement for a native gcc on the target.  Overall, I
> think this is a win due to the complexities of cross gcc's.

If you have the setup - I believe I agree.

But I think I still want to take the offer of a switch on
the add-cross script - this will be the super-solution with
all options available ;)


Cheers
-- 
http://www.HardcoreProcessing.com