Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPhone port #4782

Closed
vicuna opened this issue May 2, 2009 · 2 comments
Closed

iPhone port #4782

vicuna opened this issue May 2, 2009 · 2 comments

Comments

@vicuna
Copy link

vicuna commented May 2, 2009

Original bug ID: 4782
Reporter: n8gray
Status: closed (set by @mshinwell on 2016-12-07T13:16:37Z)
Resolution: duplicate
Priority: normal
Severity: feature
Version: 3.11.0
Category: ~DO NOT USE (was: OCaml general)
Tags: OSX, iPhone, arm, Apple

Bug description

I would really like to use OCaml in my App Store applications for the iPhone/iPod Touch platform. It appears that Apple uses a different ABI than the OCaml ARM backend and some changes are necessary to the code generator and runtime. If Apple's ABI is documented somewhere I haven't been able to find it. However, Jeffrey Scofield described a solution that works for single-threaded OCaml code, so perhaps the changes aren't overly difficult.

Additional information

This website describes a procedure for building a version of 3.10.2 that works on jailbroken iPhones. This is not suitable for commercial apps though.

http://web.yl.is.s.u-tokyo.ac.jp/~tosh/ocaml-on-iphone/

I am attaching Jeffrey Scofield's patched arm.S that he reports as working with single-threaded OCaml code.

The changes that he reports include:

  • using .globl instead of .global to satisfy Apple's assembler
  • more careful treatment of r9 and r10

File attachments

@vicuna
Copy link
Author

vicuna commented May 5, 2009

Comment author: n8gray

configure-libetpan is a script I used for configuring and building libetpan, an e-mail library, on both the iPhone simulator (x86) and the iPhone itself (arm). I'm including it here as an example of how to use Apple's gcc on the command line for those platforms.

@vicuna
Copy link
Author

vicuna commented Dec 7, 2016

Comment author: @mshinwell

#182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant