-
Notifications
You must be signed in to change notification settings - Fork 73
Description
Background
OpenBSD's system interfaces are neither forward- nor backward-compatible, which is somewhat unique among the platforms we support. There are a couple of problems this introduces:
- Binaries compiled for our generic
*-openbsd
targets work with an unclear set of OS versions libc
has no way to represent changes or removals across versions- Informal consensus seems to be that this would prevent the target from getting to tier 2, even with sufficient interest.
Proposal
Replace our generic *-openbsd
triples with a versioned triple -openbsdMmm
(M
= major, m
= minor), which will also set target_env
. For example, aarch64-unknown-openbsd707
correlates to OpenBSD 7.7 (current latest) and will set target_env = "openbsd707"
. target_env
is currently unused on the platform.
This matches the behavior of our QNX Neutrino targets, which have similar version compatibility.
Affected targets:
aarch64-unknown-openbsd
i686-unknown-openbsd
powerpc-unknown-openbsd
powerpc64-unknown-openbsd
riscv64gc-unknown-openbsd
sparc64-unknown-openbsd
All are tier 3.
Note that, as far as I can tell, the major and minor versions don't have any significance (similar to Linux) and roll over after x.9
. That is, there is no more compatibility between 6.8 and 6.9 than between 6.9 and 7.0. Releases happen every 6 months.
Unresolved Questions
- What syntax should be used?
-openbsd707
is the format used by qnx-nto, but-openbsd7.7
is easier to read and matches LLVM. - Should the existing targets without a version be deprecated, or kept and forward to e.g. the latest release?
- Do we need to have targets for every version, or can we get by creating a new target only when a breaking change happens?
- How long should we retain old versions? OpenBSD seems to maintain releases for 1 year.
Alternatives
- RFC: Target extension rfcs#2048 was a proposal to support an OS version, deferred for experimentation.
- There have been proposals that allow specifying versions, most recently RFC: cfg_target_version rfcs#3750. Most of these proposals focus on specifying a minimum version, which isn't sufficient for OpenBSD because of the lack of forward compatibility.
Mentors or Reviewers
Platform maintainer @semarie
Process
The main points of the Major Change Process are as follows:
- File an issue describing the proposal.
- A compiler team member who is knowledgeable in the area can second by writing
@rustbot second
or kickoff a team FCP with@rfcbot fcp $RESOLUTION
.- Refer to Proposals, Approvals and Stabilization docs for when a second is sufficient, or when a full team FCP is required.
- Once an MCP is seconded, the Final Comment Period begins.
- Final Comment Period lasts for 10 days after all outstanding concerns are solved.
- Outstanding concerns will block the Final Comment Period from finishing. Once all concerns are resolved, the 10 day countdown is restarted.
- If no concerns are raised after 10 days since the resolution of the last outstanding concern, the MCP is considered approved.
You can read more about Major Change Proposals on forge.