Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@shym
Copy link
Owner

@shym shym commented Feb 18, 2025

This PR is the last in the series of patches that are required to build MirageOS unikernels. The only changes still needed are small adjustments in configure to accept native freestanding targets!

It contains:

  • A commit to accept *-none and *-elf* target triplets in the configuration of the native-code compiler; I chose those suffixes by looking at what the autoconf validation script accepts and what I had the impression is commonly used (a bit biased by the C cross compilers packaged in Debian, maybe)
    • f0dccbb Accept native freestanding targets at configure time
  • A commit to recognize *-ocaml target triplets as *-none ones when computing the canonical targets, so that one can use for instance the x86_64-solo5-ocaml-* prefix for a toolchain dedicated to building freestanding OCaml applications; this is inspired by the fact that build-aux/config.sub accepts triplets such as x86_64-windows-msvc or javascript-unknown-ghcjs
    • 6cd0714 Allow *-ocaml as target triplets to build freestanding cross compilers
  • A commit to build a cross compiler to the Solo5 freestanding backend in CI to make sure that all the necessary patches have been upstreamed; this is not meant to be merged as it uses a created-just-for-that branch of ocaml-solo5 to add C stubs that are necessary to build with trunk (but not for OCaml 5.2.1, which is the latest version currently supported by ocaml-solo5)
    • a3ffadf DROPME Test the cross compiler to Solo5 in CI

The run-crosscompiler-tests label should be added to this PR to get the Solo5 test running in CI.

shym added 3 commits May 19, 2025 15:20
Accept `*-none` and `*-elf*` triplets for all the architectures with a
native backend to describe the corresponding freestanding targets;
`none` and `elf*` are the most commonly-used last components in triplets
for freestanding targets
Set `system` to `none` and `os_type` to `None` in such cases
Allow `ocaml` to be used as the last component of the target triplet in
case we are using a custom toolchain for a freestanding target. The
target triplet is then temporarily rewritten to "<arch>-none" to compute
the canonical target.
This allows to use a `*-*-ocaml-` prefixes (`x86_64-solo5-ocaml-`, for
instance) to create cross-compiler toolchains dedicated to specific
freestanding targets.
Repository owner deleted a comment from github-actions bot May 19, 2025
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