[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MirageOS-devel] TLS on Xen status
The TLS work requires ctypes and zarith to run on Xen. I now have ctypes building with Xen support, but zarith is more difficult. Hannes previously got it to work here: http://lists.xenproject.org/archives/html/mirageos-devel/2014-09/msg00100.html However, this was compiling against the local (e.g. Linux) headers, not the Mini-OS ones. It seems to work, but it's obviously not ideal. If we simply add the Mini-OS headers to the gcc search path, then things actually get worse, because they're inconsistent with the system headers. In particular, gmp probes for various header files, finds some Linux-specific ones, and then gets upset when they don't work. Ideally, Mini-OS would compile with -nostdinc and provide all the headers it needs itself. Unfortunately, this requires adding a lot of standard headers with information the C compiler already knows. It seems you can't do this automatically: http://stackoverflow.com/questions/2681304/compile-for-freestanding-environment-with-gcc I tried adding the ones that seemed to be missing. These were needed to compile Mini-OS itself with -nostdinc: inttypes.h limits.h stdarg.h stddef.h stdint.h strings.h However, to compile other programs (e.g. openlibm) requires more. For example: sys/cdefs.h complex.h (this is as far as I've got) In short, there's a fair bit of work needed to get everything compiling against the correct headers. It's also not completely clear to me how to package 3rd-party libraries such as zarith, which are unlikely to accept patches for our xen_linkopts system (which is essentially a hack around the current lack of cross-compilation support in opam). We previously discussed adding opam depexts to the official package, pointing to our own zarith-xen package for the C stubs. However, this relies on our package providing exactly the correct versions of the C stubs to work with the main package. Not impossible with some version constraints, but it seems messy. Another option is to have our own mirage-zarith package and get everything to depend on that. But we'll be incompatible with any OCaml library using the official version then. -- Dr Thomas Leonard http://0install.net/ GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |