Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Making OS X universal binaries

3 views
Skip to first unread message

Richard Bornat

unread,
Sep 12, 2007, 6:12:46 AM9/12/07
to caml...@yquem.inria.fr
I have a need to build a OS X universal binary of an OCaml program. I
found out how to do it (apologies if this is already posted, but I
couldn't find a solution in the archives).

1. Install the PowerPC version of OCaml. Squirrel away /usr/local/bin/
ocamlopt and /usr/local/lib/ocaml (I just added ppc to their names).

2. Install the Intel version of OCaml.

3. To make a ppc version of the program, compile with /usr/local/bin/
ocamloptppc (no need to add any extra arguments), and link with /usr/
local/bin/ocamloptppc -ccopt "-arch ppc" -nostdlib -I /usr/local/lib/
ocamlppc.

That's it. When you've made both versions, merge them with lipo. ppc
compilation and loading is a bit slow, but that's the only drawback
I've found.

Sorry again if this is a bit obvious ...

Richard Bornat

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

0 new messages