[MLton-user] Cross-compilation problem

vincenzo.rana at email.it vincenzo.rana at email.it
Tue Aug 22 10:15:11 PDT 2006


Hi to everyone,
	this is my first post to this ML. I write it because I have some problems
with cross-compilation using mlton. I tried to get C code from some examples
using the mlton -keep option, and then using the obtained C code and some
libraries I tried to generate an x86-executable. It seems to me that to
obtain the executable we just need:
1 - the C code obtained by using mlton
2 - two headers file provided by mlton (c-main.h and c-chunk.h)
3 - some libraries:
	a - libgmp
	b - libm
	c - libmlton (provided by mlton) 
	d - libgdtoa (provided by mlton)
Using these files I'm able to create an x86 executable, so I tried to start
the cross-compilation flow to cross-compile the examples for a PPC_4xx
target machine. The C code and the headers files are the same, so I have got
them; I downloaded and successfully cross-compiled libgmp and libm is
provided by the cross-compilation framework. So now I just need libmlton and
libgdtoa; I tried to cross-compile them, and then started my problems. Mlton
provide a script to do it, but this script "uses ssh to compile the runtime
on the target machine", so it is not suitable for me, because I cannot do it
(I mean I cannot use ssh on the target machine); I tried to manually modify
the Makefile to cross-compile the library, but this phase (mlton
compilation) created some executables that have to be run on the host
machine, so I cannot compile everything just for the target machine. My
solution to this problem was to use both the normal and the cross-compiling
gcc to generate the two sets of executables and libraries. After that I
tried to compile the C code obtained by using mlton with the new
cross-compiled libraries, but I get some "undefined reference" errors (in
particular undefined reference to gmp library functions).
What do you think that is possible to do to get the right libraries or to
obtain a script that doesn't run ssh to generate the libraries for the
target machine?

Thanks very much for your help

Greetings

Vincenzo Rana 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Vinci 100 giorni di Sheba: partecipa al concorso e vinci ricchissimi set di
prodotti per far felice il tuo gatto!
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=5269&d=20060822





More information about the MLton-user mailing list