Skip to content

Support OCaml 4.06.0#27

Merged
mato merged 2 commits into
mirage:masterfrom
mato:ocaml-4.06.0
Nov 21, 2017
Merged

Support OCaml 4.06.0#27
mato merged 2 commits into
mirage:masterfrom
mato:ocaml-4.06.0

Conversation

@mato
Copy link
Copy Markdown
Contributor

@mato mato commented Nov 16, 2017

Due to the refactoring of the compiler build system in 4.06.0 this is not the usual trivial change, and now needs separate paths for >= 4.06.0. I'm not entirely happy with the hacks involved but "it works for me".

Tested on Linux with ukvm and the mirage-skeleton device-usage/network example; I'd appreciate more testing and review from others before merging this (/cc @hannesm).

@hannesm
Copy link
Copy Markdown
Member

hannesm commented Nov 16, 2017

@mato thanks for doing this.

We now need separate paths (for <4.06 and >= 4.06) now, but do we really need the bits from the bigarray subdirectory? ocaml/ocaml#1077 is where most symbols got moved into the OCaml runtime.

The header file dance is due to ocaml/ocaml#1127

I'll test this tomorrow and report back!

@hannesm
Copy link
Copy Markdown
Member

hannesm commented Nov 17, 2017

I tested this as is on FreeBSD, and it works nicely!

@mato
Copy link
Copy Markdown
Contributor Author

mato commented Nov 21, 2017

@hannesm Thanks for the pointers to the OCaml issues. Based on my reading of the comments there it looks like my approach is correct. I've pushed a small change that improves the naming for the variable triggering the >=4.06.0 build paths, otherwise I think this is fine.

Regarding the continued need for libotherlibs.a post 4.06.0, I don't know enough about whether or not those symbols are used further up the stack. At this point I'd just merge as-is since it won't hurt, and anyone who wants to investigate further can do that in a followup PR.

@hannesm
Copy link
Copy Markdown
Member

hannesm commented Nov 21, 2017

@mato yes, fully agreed. and to me it looks like at some point in 4.07+, OCaml may include the entire bigarray (apart from the map_file) into its stdlib. once this happens, we can get rid of otherlibs, but with 4.06 we need it.

@mato mato merged commit a326c91 into mirage:master Nov 21, 2017
@mato mato deleted the ocaml-4.06.0 branch November 21, 2017 11:52
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.

2 participants