[MLton] power pc "port"

Filip Pizlo pizlo@purdue.edu
Wed, 1 Sep 2004 10:24:28 -0500 (EST)


> Let me revise this.  I think that spawnv{e,p} don't actually exist on
> linux (and other unix derivatives, so probably not on Mac OS X).  On non
> Windows platforms, MLton.Process.spawn* functions are supposed to simplify
> down to Posix.Process.fork/exec (and hence to their underlying system
> calls), so the MLton_Process_spawn{e,p} functions are not used, and hence
> the linker avoids bringing them in.

OK., that makes more sense...

> There are a couple of possiblities:
> 1) The simplifications of MLton.Process.spawn* functions aren't being
>    performed correctly.  This might happen if
>    MLton.Platform.{Arch,OS}.host aren't implemented correctly.
> 2) The Mac OS X linker isn't handling archive libraries in the same way
>    that the linux linker is.  What is supposed to happen is that when
>    linking with libmlton.a, when there is no reference to
>    MLton_Process_spawn{e,p} in the object file compiled by mlton (because
>    they got simplified away), then the corresponding spawne.o and spawnp.o
>    object files in the archive are not included.  Hence, the spawnve and
>    spawnvp functions (and corresponding symbols) aren't needed/included
>    in the final program, so there isn't any reason for the linker to go
>    looking for them.

Right now, I'm building libmlton as a dynamic lib because static linking
is giving me other problems.  So this would explain it.

Other than the situation with spawnve/p functions, is there any particular
reason why libmlton and libgdtoa are static rather than dynamic?

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