Use the usual layout to compile freestanding C stubs#441
Conversation
6f1ebff to
671fda4
Compare
|
AFAICT at the moment the C stubs are provided by mirage-xen & mirage-solo5 -- including them here will lead to duplicated symbols at the link step (this means, mirage-solo5/mirage-xen should be updated to not provide the symbols anymore at the same time)... maybe this PR should be delayed until mirage4 is out (which, IIUC, will handle C stubs without the need for extra Makefiles)? |
It seems that the Currently, However, as you can say, it seems that, at least for FreeBSD I believe, this patch does not work. So, to clear the situation, without any solution:
For my perspective, may be it's the time to delete |
|
to avoid conflicts / unnecessary churn, I propose:
The renaming leads to old mirage-solo5 and new tcpip continues to be symbol-conflict-free linkable (old tcpip releases will need to conflict with new mirage-solo5/mirage-xen (those with the checksum_stubs removed)). overall, it is not clear to me what the impact is: what about cstruct stubs and io-page stubs? anything else that is now in mirage-solo5/mirage-xen, and should instead be in the respective library that uses it? |
We did not find a problem for |
|
I prepended C functions with |
… a Solo5 unikernel
…ions available on mirage-xen/mirage-solo5
605c928 to
2b29b0c
Compare
|
to me this change looks good. should we move forward and remove the tcpip.unix package entirely? (this would be a breaking change, but I think it is fine - there are barely users of tcpip.unix AFAICT) |
|
I looked, and |
hannesm
left a comment
There was a problem hiding this comment.
LGTM. Please merge and release when CI is happy.
3cf50af to
97d3fed
Compare
|
Thanks for the further work! |
CHANGES: * Ensure that listen really binds the given socket before creating a task on `tcpip.stack-socket` (@dinosaure, @hannesm, mirage/mirage-tcpip#439) * Add `ppx_cstruct` as a dependency (@hannesm, @dinosaure, mirage/mirage-tcpip#439) * Upgrade to ocamlformat.0.17.0 (@dinosaure, mirage/mirage-tcpip#442) * Drop the support of OCaml 4.08.0 (@dinosaure, mirage/mirage-tcpip#442) * Use the usual layout to compile freestanding C stubs and link them to a Solo5 unikernel (@dinosaure, @hannesm, mirage/mirage-tcpip#441) **breaking changes** C stubs are prepended by `mirage_`. Symbols such as checksum's symbols are `caml_mirage_tcpip_*` instead of `caml_tcpip_*` `tcpip.unix` is a fake sub-package and user does not it anymore, he can safely remove it from its project. * Conflict with `< ocaml-freestanding.0.4.1` (@hannesm, mirage/mirage-tcpip#441)
CHANGES: * Add cancelation on `tcpip.stack-socket` (@dinosaure, @talex5, @hannesm, mirage/mirage-tcpip#443) * Ensure that listen really binds the given socket before creating a task on `tcpip.stack-socket` (@dinosaure, @hannesm, mirage/mirage-tcpip#439) * Add `ppx_cstruct` as a dependency (@hannesm, @dinosaure, mirage/mirage-tcpip#439) * Upgrade to ocamlformat.0.17.0 (@dinosaure, mirage/mirage-tcpip#442) * Drop the support of OCaml 4.08.0 (@dinosaure, mirage/mirage-tcpip#442) * Use the usual layout to compile freestanding C stubs and link them to a Solo5 unikernel (@dinosaure, @hannesm, mirage/mirage-tcpip#441) **breaking changes** C stubs are prepended by `mirage_`. Symbols such as checksum's symbols are `caml_mirage_tcpip_*` instead of `caml_tcpip_*` `tcpip.unix` is a fake sub-package and user does not it anymore, he can safely remove it from its project. * Conflict with `< ocaml-freestanding.0.4.1` (@hannesm, mirage/mirage-tcpip#441)
CHANGES: * checksum stubs: Drop `caml_` from their name (@hannesm, mirage/mirage-tcpip#445) * Add cancelation on `tcpip.stack-socket` (@dinosaure, @talex5, @hannesm, mirage/mirage-tcpip#443) * Ensure that listen really binds the given socket before creating a task on `tcpip.stack-socket` (@dinosaure, @hannesm, mirage/mirage-tcpip#439) * Add `ppx_cstruct` as a dependency (@hannesm, @dinosaure, mirage/mirage-tcpip#439) * Upgrade to ocamlformat.0.17.0 (@dinosaure, mirage/mirage-tcpip#442) * Drop the support of OCaml 4.08.0 (@dinosaure, mirage/mirage-tcpip#442) * Use the usual layout to compile freestanding C stubs and link them to a Solo5 unikernel (@dinosaure, @hannesm, mirage/mirage-tcpip#441) **breaking changes** C stubs are prepended by `mirage_`. Symbols such as checksum's symbols are `caml_mirage_tcpip_*` instead of `caml_tcpip_*` `tcpip.unix` is a fake sub-package and user does not it anymore, he can safely remove it from its project. * Conflict with `< ocaml-freestanding.0.4.1` (@hannesm, mirage/mirage-tcpip#441)
CHANGES: * checksum stubs: Drop `caml_` from their name (@hannesm, mirage/mirage-tcpip#445) * Add cancelation on `tcpip.stack-socket` (@dinosaure, @talex5, @hannesm, mirage/mirage-tcpip#443) * Ensure that listen really binds the given socket before creating a task on `tcpip.stack-socket` (@dinosaure, @hannesm, mirage/mirage-tcpip#439) * Add `ppx_cstruct` as a dependency (@hannesm, @dinosaure, mirage/mirage-tcpip#439) * Upgrade to ocamlformat.0.17.0 (@dinosaure, mirage/mirage-tcpip#442) * Drop the support of OCaml 4.08.0 (@dinosaure, mirage/mirage-tcpip#442) * Use the usual layout to compile freestanding C stubs and link them to a Solo5 unikernel (@dinosaure, @hannesm, mirage/mirage-tcpip#441) **breaking changes** C stubs are prepended by `mirage_`. Symbols such as checksum's symbols are `caml_mirage_tcpip_*` instead of `caml_tcpip_*` `tcpip.unix` is a fake sub-package and user does not it anymore, he can safely remove it from its project. * Conflict with `< ocaml-freestanding.0.4.1` (@hannesm, mirage/mirage-tcpip#441)
This PR wants to provide a smooth transition between MirageOS 3 and MirageOS 4. Even if the goal permits a long term support of MirageOS 3 and
tcpip, the real goal is to avoid any constraints betweentcpip, MirageOS 3 and MirageOS 4.As we checked (@TheLortex and me) the usual layout for C stubs available on
mirage-cryptoanddigestifis compatible with MirageOS 4.tcpip(due to the story) still continue to use some corner cases about the MirageOS 3 linking step. This PR is like an unification of C stubs in our MirageOS eco-system.By this way and if we cut a release with that, we don't need to upgrade
tcpipfor MirageOS 4 and we don't need to care about incompatible details between MirageOS 3, MirageOS 4 and this version oftcpip. So it paves the way for a smooth transition.NOTE: the new artifact
libtcpip_freestanding_stubs.ais needed only for MirageOS 3 (at the linking step). Then, when time forgets MirageOS 3, we will be able to delete that.