Skip to content

Conversation

@shym
Copy link
Owner

@shym shym commented Jan 8, 2025

No description provided.

shym added 4 commits January 8, 2025 12:26
Accept `*-none` and `*-elf*` triplets for all the architectures with a
native backend to describe the corresponding freestanding target
Define `system` to `none` is such cases

Rationale: the last component of the target triplet is usually the OS;
for freestanding targets, the most commonly used placeholders one might
want to target with OCaml are `none` and `elf*`.
Set the value of `Sys.os_type` (for compiled programs) and of the
`os_type` compiler configuration to `None` for freestanding targets
The freestanding targets currently used rely on either GNU `ld` or
`lld`. GNU `ld` now requires the explicit mention that the stack should
not be executable by seeing the `.note.GNU-stack` section. `lld` ignores
this section.

Recall that on freestanding targets, `system` is set to `none`.
Allow the use of *-*-ocaml or *-*-*-ocaml target triplets to stand for
freestanding cross compilers by temporarily rewriting the target OS to
`none` when generating the canonical target

This allows to use *-*-ocaml and *-*-*-ocaml prefixes for cross-compiler
specific toolchains, so that all the specific tools (for instance
aarch64-solo5-ocaml-gcc, etc.) can be discovered automatically by
`configure`
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.

1 participant