Skip to content

Split the -openbsd* targets by version #916

@tgross35

Description

@tgross35

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:

  1. Binaries compiled for our generic *-openbsd targets work with an unclear set of OS versions
  2. libc has no way to represent changes or removals across versions
  3. 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-openbsd707correlates 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

  1. What syntax should be used? -openbsd707 is the format used by qnx-nto, but -openbsd7.7 is easier to read and matches LLVM.
  2. Should the existing targets without a version be deprecated, or kept and forward to e.g. the latest release?
  3. Do we need to have targets for every version, or can we get by creating a new target only when a breaking change happens?
  4. 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.
  • 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.

Caution

Concerns (3 active)

Managed by @rustbot—see help for details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerAdd this label so rfcbot knows to poll the compiler teamhas-concernsThere are active concernsmajor-changeA proposal to make a major change to rustcto-announceAnnounce this issue on triage meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions