[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MirageOS-devel] TLS packaging status update
This is taking a bit longer than expected... here's the current status. I have ocaml-tls working on Xen/ARM (and demoed by Anil at #osio), by compiling in an OPAM switch with the right CFLAGS for Mini-OS. However, we don't want to do it this way because dealing with OPAM switches is annoying. Instead, I'm adding an ocamlfind variable which packages can use to indicate the C stubs to link against under Xen. e.g. tcpip would put this in its META file: xen_linkopts = "-ltcpip_xen_stubs" No libraries will be linked without this option, so we won't accidentally link Unix libraries. This is important on x86_64, where linking Unix libraries creates subtle race conditions due to the "red zone" not being available in kernel mode. When testing this, I realised we compile openlibm for Unix, so I updated that to get the CFLAGS from Mini-OS, but it turned out that didn't work because Mini-OS doesn't provide sys/types.h (just types.h), and also openlibm used some legacy type names that Mini-OS doesn't provide. sys/types.h is currently provided by mirage-platform. Options: 1. Make openlibm depend on mirage-platform to get sys/types.h. 2. Rename Mini-OS's types.h to sys/types.h and put everything there. 3. Modify openlibm to use only stdint.h. I'm leaning towards option (3) at the moment (assuming it's possible), but shout if you have a better idea! After that, I'll update mirage-profile and tcpip to the new linking system and make a pull request for the updated mirage tool. You'll probably need to update several things at once when this happens. Then we'll be in a position to add the tls libraries. That might require a little extra work if we want to add Xen C stubs to 3rd-party packages (e.g. zarith). Anil has suggested using OPAM depexts for this. Finally, we could really use some pkg-config support in OASIS. Otherwise, getting the necessary CFLAGS is unreasonably difficult... -- 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 |