[MLton] Debian package (was: Finished (?) MLton.Child)

Wesley W. Terpstra terpstra@gkec.tu-darmstadt.de
Fri, 3 Dec 2004 14:06:02 +0100


On Thu, Dec 02, 2004 at 05:06:27PM -0800, Stephen Weeks wrote:
> > If you like I can look into this; linux is pretty similar no matter what
> > the arch, so I can't imagine that it would be too difficult... The C
> > codegen will work on any platform right?
> 
> The C codegen generates architecture-dependent code.  Also, the
> runtime contains some architecture-dependent code; see, e.g.,
> runtime/basis/Real/class.c.

In what way is the C codegen architecture-dependent?
What sort of things I am going to need to change?
Just runtime/*?

I am not courageous enough to look into the backend code yet.
If I was, 32*32->64bit mul would be done. ;)

> Porting MLton to Linux on a new platform is not hard, but it's more than a
> few hours.  With Debian, there is an additional bootstrapping problem --
> since MLton needs itself to build, how do we get the initial MLton in
> there? 

I've thought about this.

As the maintainer you can upload a binary for other archs manually. Then,
you bump the version on your next upload and just upload a binary to i386
with Architecture: any. The buildds will automatically rebuild the package
using the version you manually uploaded last.

Of course, getting that first binary MLton package is a problem.
I think using an i386->target cross-compiler is the best way to go.

> Anyways, we'd be happy to have you do this.

I will at least try this for powerpc since it seems you already have
support for MacOS and therefore ppc floats and other things.
http://db.debian.org/machines.cgi suggests bruckner.debian.org.

> Before I go back to him I'd like to confirm that you have successfuly
> built MLton on a Debian sid machine.  He said it worked fine on sarge
> but not on sid.

make[2]: Leaving directory /media/misc/terpstra/mlton/test'
Build of MLton succeeded.
make[1]: Leaving directory /media/misc/terpstra/mlton/test'
terpstra@carrot:~/mlton/test$ dpkg --list mlton
ii  mlton          20041109-1     Optimizing compiler for Standard ML
terpstra@carrot:~/mlton/test$ head -1 /etc/apt/sources.list
deb ftp://linux.mathematik.tu-darmstadt.de/debian/ sid main contrib non-free

-- 
Wesley W. Terpstra