[MLton] power pc "port"

Filip Pizlo pizlo@purdue.edu
Fri, 27 Aug 2004 17:54:07 -0500 (EST)


Stephen --

> > Filip and I are stuck on a small annoyance: we are trying to use the
> > boostrap-nj to compile an initial MLton,
> 
> I haven't bootstrapped MLton with SML/NJ in years and am not even sure
> if it works.

Just a quick status update: We got SML/NJ to compile MLton on my PowerBook
using the previously suggested trick (we moved the *.grm.sml, *.grm.sig,
and *.lex.sml files from Luke's mlton directory on a Linux machine over to
my PowerBook).  Right now I'm having some minor issues getting
upgrade-basis to do the right thing for the Darwin/PowerPC target.  Since
upgrade-basis is not doing the right thing, the mlton binary immediately
bombs with a "strange arch" error in main/main.fun.  I hope to have that
fixed shortly.

> It's certainly not the development path I'd recommend
> when doing a new port.  The easiest approach I have found is to use a
> platform that already works (I use Linux) and to first get all the
> regressions working by cross compilation.  To cross compile, use MLton
> to build the .[cS] files on the Linux machine, copy the files to the
> new machine, and use gcc on the new machine to compile them.  The
> -cross and -run-only switches to the regression script facilitate
> this.

That was the path that I was planning on taking if the current one failed,
or took too much effort.  However, since the SML/NJ path seems to be
progressing, I'll just see how far I get with it.  But thanks for the
info -- it may still turn out that cross-compiling is the way to go.

--
Filip Pizlo
http://bocks.psych.purdue.edu/
pizlo@purdue.edu