[MLton] power pc "port"
Matthew Fluet
fluet@cs.cornell.edu
Fri, 3 Sep 2004 15:25:16 -0400 (EDT)
> This part failed, because /bin/cp has different semantics on Mac OS X than
> on the other systems you guys use. Basically, when trying to compile
> tmp.c, I got a couple of pages or errors because platform/darwin.h was not
> found. This was because the top-level Makefile was copying the platform
> directory as follows:
>
> $(CP) runtime/platform/ runtime/*.h include/*.h $(LIB)/include/
>
> The problem is that when Mac OS X's /bin/cp sees a trailing '/' in the
> source list, it copies the contents of the directory instead of the
> directory itself. So to make it work, I changed the Makefile so that
> 'platform' does not have a trailing '/' and then reran make
> runtime. After that, it all worked.
Great. We probably should remove the trailing '/' from the Makefile,
as we do mean to copy the directory.
> I notice that -lgmp is not in the library list. On my computer, I had to
> install gmp myself and whenever I build anything that uses it, I have to
> include -lgmp in the list of link commands. How does this work on the
> other platforms?
>
> Anyway, I'll use -target-link-opt to throw -lgmp in there to see how the
> regressions do.
We have a dependency on gmp; i.e., we expect gmp to be installed on the
machine. You should edit the mlton.cvs.HEAD/bin/mlton script and add
a -target-link-opt ppc option with the appropriate flags. You should see
how we handle other platforms. The User Guide explicitly states that
users may need to edit the mlton script if their gmp is in a non-standard
place.