Conversation
…able support for PIE. PIC is now on if supported for the model. Signed-off-by: Gerd Stolpmann <[email protected]>
… for the generation of jump tables in thumb mode - workaround for the generation of frametables - basic changes in arm.S - introduction of ldgaddr and ldladdr macros in arm.S which will be exploited later in the PIE patch - a little EABI fixup in arm.S: saving all FP regs where needed (EABI_APPLE is an EABI_HF variant) Signed-off-by: Gerd Stolpmann <[email protected]>
…ores. Signed-off-by: Gerd Stolpmann <[email protected]>
…ons - IOS defines __divsi3 and __modsi3 instead of __aeabi_idiv and __aeabi_imod, resp Signed-off-by: Gerd Stolpmann <[email protected]>
…. Support both types of mnemonics, and select the right type dynamically. Signed-off-by: Gerd Stolpmann <[email protected]>
…number (sic) Signed-off-by: Gerd Stolpmann <[email protected]>
…ttle bit tricky, as these conventions do not directly fit to the framework (which doesn't support register pairs). The workaround is that we pretend that the first two float args are passed via d0 and d1, and that the single float result comes back in d0. This is not the truth, but fits into the framework. In reality, the float args go into r0/r1, r1/r2 or r2/r3, and are mixed with any int or pointer args. The float result is in r0/r1. When we emit the call instruction, we also emit additional code that moves the floats from d0 and d1 to the register pairs (and potentially also moves the integers away that are already there). After returning from the call, the float, if any, is loaded into d0. The price of this workaround: up to three additional moves per extcall. Signed-off-by: Gerd Stolpmann <[email protected]>
… can be resolved by ld (that's where PIE is simpler than PIC). Signed-off-by: Gerd Stolpmann <[email protected]>
…RM. Also adding a generic fixup system for cross builds - Makefile: adding targets cross-boot, cross-all, cross-opt - build.sh: a sample driver for building do not install "ocaml" if not built Signed-off-by: Gerd Stolpmann <[email protected]>
…pports unsigned immediates. Only for add/sub we can handle negative immediates by inverting the operation. (This is for all platforms, not only iOS.) Signed-off-by: Gerd Stolpmann <[email protected]>
… hash mark according to ARM; (2) avoiding multi-statement C macros and using assembler macros instead Signed-off-by: Gerd Stolpmann <[email protected]>
Signed-off-by: Gerd Stolpmann <[email protected]>
…e arg of #0 in thumb mode. Replacing by a simple mov. Signed-off-by: Gerd Stolpmann <[email protected]>
Signed-off-by: Gerd Stolpmann <[email protected]>
Signed-off-by: Gerd Stolpmann <[email protected]>
Signed-off-by: Gerd Stolpmann <[email protected]>
Signed-off-by: Gerd Stolpmann <[email protected]>
Conflicts: VERSION boot/ocamlc boot/ocamldep boot/ocamllex configure tools/.depend
|
Can you rebase this onto 4.02.2? I will make a PR for OPAM to add it to the list of switches, under the name |
|
Sure, will do this later today. |
|
I managed to do it today. There is a new branch "gs-4.02.2+ios" (https://github.com/gerdstolpmann/ocaml/tree/gs-4.02.2) and a tag "4.02.2+ios" (https://github.com/gerdstolpmann/ocaml/tree/4.02.2+ios). The tag is meant to point to the version users should pick (in case more fixes will be necessary). If you need this in a different repo, I'm happy to create a PR. I had to fix a few conflicts, and also to remove some of the "CAMLRUN=..." variable overrides from the Makefile (these are simply no longer necessary after the cross-build fixups in 4.02.2). I did a quick test with a super-simple app for both modes (32/64 bit). |
|
Silly me, I just realized that this will probably not work as a compiler switch for OPAM, and it would be better to make a new package for the cross-compiler. As I'm moving back to France next week, I won't have the time to do it before July. If anyone else wants to try in the meantime, feel free. |
|
There is now also a version of this patch rebased to 4.02.3: https://github.com/gerdstolpmann/ocaml/tree/gs-4.02.3+ios |
|
A quick update following discussions at the developers's meeting last Wednesday. We are very much interested in integrating this iOS port eventually, but it needs more work than we can allocate by the next major release (OCaml 4.03). Ideally, the integration should be done in 2016 as part of a more general work on cross-compilation support. Thanks for your patience. |
|
Thanks for letting us know. It should be no problem to maintain this work as external patch for some time. |
|
Unfortunately, I cannot support this work anymore - new job, new interests, no time. Sorry for any inconvenience. |
|
Note: branch saved to |
…l#182) Co-authored-by: Thibaut Mattio <[email protected]>
Supports cross-compiling to iOS, both 32 bit and 64 bit mode.
Build instructions are included in the file README.ios.
Authorship: the iOS Porting Team (Gerd Stolpmann, Jeffrey Scofield, Mark Hayden).