Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
configureto accept native freestanding targets!It contains:
*-noneand*-elf*target triplets in the configuration of the native-code compiler; I chose those suffixes by looking at what theautoconfvalidation script accepts and what I had the impression is commonly used (a bit biased by the C cross compilers packaged in Debian, maybe)*-ocamltarget triplets as*-noneones when computing the canonical targets, so that one can use for instance thex86_64-solo5-ocaml-*prefix for a toolchain dedicated to building freestanding OCaml applications; this is inspired by the fact thatbuild-aux/config.subaccepts triplets such asx86_64-windows-msvcorjavascript-unknown-ghcjs*-ocamlas target triplets to build freestanding cross compilersocaml-solo5to add C stubs that are necessary to build withtrunk(but not for OCaml 5.2.1, which is the latest version currently supported byocaml-solo5)The
run-crosscompiler-testslabel should be added to this PR to get the Solo5 test running in CI.