Skip to content
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

add xen_linkopts XMETAExtraLines for xen-via-mirage users #20

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

yomimono
Copy link
Contributor

@yomimono yomimono commented Apr 7, 2016

These extra tags are required to use ocaml-crc with MirageOS unikernels.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling e0dc370 on yomimono:xen_linkopts into 60ebf6b on xapi-project:master.

@johnelse
Copy link
Contributor

johnelse commented Apr 7, 2016

Well the tests pass so fine by me :D

@johnelse johnelse merged commit 39f0f0e into xapi-project:master Apr 7, 2016
@hannesm
Copy link
Contributor

hannesm commented Apr 8, 2016

@johnelse thanks! if you could now make a release of crc to opam, that'd be great! :)

@hannesm
Copy link
Contributor

hannesm commented Apr 8, 2016

(but otoh, I'm not sure whether this actually results in a working library, someone should check that -- it doesn't do the xen CFLAGS juggling (e.g. using -mno-red-zone))

@johnelse
Copy link
Contributor

Is there a sensible way of getting travis to test this (at least the build)? I don't want to break it :)

Let me know when this is ready and I'll make a release.

@hannesm
Copy link
Contributor

hannesm commented Apr 12, 2016

This patch from @talex5 looks more complete talex5@7b7c597 (which also provides a xen flag to _oasis, and compiles the stubs if mirage-xen is present ).

You can use that patch, and have an item such as - OCAML_VERSION=latest DEPOPTS=mirage-xen in your travis.yml (as another entry in the matrix section), this will let travis install mirage-xen and build crc with MirageOS/Xen support.

To properly test it, there's no way we can convince travis (to start up a Xen virtual machine), but you could write your test cases as a unikernel, outputting to console and look whether it looks sensible.

@yomimono what's your opinion? did you actually execute crc code using your patch on Xen yet?

@talex5
Copy link
Contributor

talex5 commented Apr 12, 2016

Note that compiling without -mno-red-zone will result in a binary that mostly works, but occasionally crashes (if an interrupt occurs while a CRC calculation is taking place). We had this problem with tcpip a while back, and it was hard to track down: mirage/mirage-tcpip#80

(you also need to symlink a copy of the source file, because oasis only compiles each source path once, even if you ask for it to be compiled with different sets of flags)

I don't even remember making my patch, nor why I didn't send a PR for it, but it looks reasonable to me (given we don't have opam support for cross-compiling yet).

@hannesm hannesm mentioned this pull request Apr 12, 2016
@yomimono
Copy link
Contributor Author

Yes, I did execute this code in Xen but it was never heavily in use; I'm totally fine with merging @talex5's patches instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants