[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] mirage, opam and cross-compiling... ?



Hi Chris,

Now that the release is out, I've created a tracker issue for the
cross compilation question, as our next major backend target is Xen/ARM:

https://github.com/mirage/mirage/issues/182

-anil

On Thu, Sep 19, 2013 at 09:55:55AM +0100, Christopher Greenhalgh wrote:
> On 18 September 2013 16:58 Anil Madhavapeddy wrote:
> 
> >- there's no standard for specifying an equivalent to CFLAGS/CC in
> >OCaml build systems -- everyone defines their own.
> 
> I did some thinking about (something that turned out to be equivalent
> to) this and I came up with what - to me - seems like a sensible scheme;
> for posterity I've noted it here:
> https://github.com/cgreenhalgh/ocaml-crosscompiling/blob/master/docs/toolchainproposal.md
> but probably it should be fed somewhere else as it would involve a new
> flag in all the ocaml commands...
> 
> >- the annoying ones are usually syntax extensions, which need to be
> >built as host libraries and not target libraries.  We have a way to
> >sidestep this as of a few weeks ago.  Leo White has built a specialized
> >compiler driver that bypasses the usual compiler parse tree, and
> >instead statically links in some camlp4 extensions.  This is not only
> >faster, but it avoids dynamic linking in the compiler completely!  Most
> >of our syntax extension requirements are actually pretty minimal (the
> >Lwt one, and perhaps Sexplib and Cow), so we could just link those into
> >one mega-compiler-driver that works on all the source code that we care
> >about.
> 
> With and ocaml-android cross-compiler this seems to have 'just worked'
> so far, presumably because it is using the syntax extensions as bytecode
> only and they have no dependencies on native libraries. (I haven't dug
> enough to see exactly what is going on yet). Potentially fragile,
> though...
> 
> p.s.  I've left a link but moved my notes to a new git repo,
> https://github.com/cgreenhalgh/ocaml-crosscompiling )
> 
> Cheers Chris

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.