OCamlをAndroidにポーティングした
最新版はこちら (2010/12/8)
という感じです。 caml-listにもポストしたよ。
お手元で試すにはOCaml のソースコードにパッチを当ててビルドします。やり方はこちらで説明しています。
http://sites.google.com/site/keigoattic/ocaml-on-android
TODO
なかみ
Xavier御大がOCaml を ARM-EABI にポーティングしていたので、特にむずかしいことはやってません。サポートされていない APIを何かで置き換えたりとか そんな感じでした。 以下メモ
asmrun/signals_osdep.h: around l.81 -#elif defined(TARGET_arm) && defined (SYS_linux) +#elif defined(TARGET_arm) && defined (SYS_linux) && !defined (ANRDOID) (since android toolchain does not provide <sys/ucontext.h>) byterun/sys.c: around l.54 remove these lines -#ifndef _WIN32 -extern int errno; -#endif (since errno is defined differently) unix/termios.c: around l.270 CAMLprim value unix_tcdrain(value fd) +{ invalid_argument("tcdrain not implemented"); } -{ - if (tcdrain(Int_val(fd)) == -1) uerror("tcdrain", Nothing); - return Val_unit; -} (since android ndk does not provide `tcdrain') utils/ccomp.ml: around l.80?? - command(Printf.sprintf "ar rc %s %s" + command(Printf.sprintf "/path/to/your/arm-eabi-ar rc %s %s" (to make ocamlopt generate lib*.a correctly by the android's `ar')