-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade to dune-lang 2, remove minios-based xen support, add solo5-based xen support, add unikernel for testing #86
Conversation
You should, at least, add a new
|
8c30dbb
to
374bba0
Compare
Just a curious question, why you choose to use |
@dinosaure based on the discussion in mirage/mirage-xen#23, when using dune's support for compiling C code it always embeds some C flags in the process ( |
Hmmhmm, that means I need to do an update on |
@dinosaure yes, I propose to wait until mirage-xen 6.0.0 is out in the open, and then revise once all our C artifacts. There'll be another round of revising them when either mirage or dune is enhanced with different cross-compilation support. |
having said this, at the moment there's no need for action since we're (by luck) getting usable unikernels -- in general mixing PIC and non-PIC compiled objects is undefined behaviour, and a showstopper for PIE binaries. |
dune 2 deprecated c_names & c_flags in a stanza, use foreign_library instead
As discussed in mirage/mirage-xen#23, using dune's C compilation support leads to unexpected CFLAGS, especially -fPIC and -fno-strict-aliasing in our setup. To regain control of CFLAGS, instead use a Makefile. There's no need for the OCaml mirage-crypto.freestanding / mirage-crypto.xen sublibraries anymore. Failure of compilation are allowed if the respective opam packages (mirage-xen-posix, ocaml-freestanding) are not installed. For a successful cold `dune build @install` run, (alias install) is added to the (copy-files# ..) stanze in xen/dune and freestanding/dune. The libmirage_crypto_{xen,freestanding}_stubs.a are installed directly in the lib/mirage-crypto/ directory.
This is ready for review, CI is green, and awaiting your feedback. I additionally tested it full-circle with a solo5 MirageOS unikernel successfully. This PR consists of 4 commits: (a) use dune 2.x (in preparation for b, maintenance), (b) use a Makefile for cross-compilation (see mirage/mirage-xen#23) to have control over CFLAGS, (c) remove minios-based xen support, add solo5-based xen support, (d) a test unikernel used in travis and cirrus. |
The new xen stack uses ocaml-freestanding, gmp-xen and zarith-xen are no longer used across the chain. This simplifies the setup massively, and no longer requires the xen subdirectory for cross-compilation. This removes CI jobs for xen-based MirageOS unikernels (to be added again once mirage with solo5-based xen support is released).
264ac34
to
344b3f4
Compare
9bbd9d7
to
5c00d94
Compare
The motivation is to detect linking issues with mirage as early as possible.
…mirage-crypto-rng-mirage (0.8.6) CHANGES: * Detect CPU architecture from C compiler, allowing cross-compiling to Android and iOS (mirage/mirage-crypto#84 by @EduardoRFC) * Upgrade to dune2, use a Makefile for building freestanding libraries, drop mirage-xen-posix support (solo5-based PVH exists now) mirage/mirage-crypto#86 by @hannesm
dune 2 deprecated c_names & c_flags in a stanza, use foreign_library instead