Skip to content

Support for additional POSIX platforms (FreeBSD, OpenBSD, NetBSD) #15

@kristjanvalur

Description

@kristjanvalur

Overview

stackman currently supports Linux, macOS, and Windows. Adding BSD variants would expand platform coverage for POSIX systems.

Platforms to consider

  1. FreeBSD - Popular server OS, similar to Linux ABIs
  2. OpenBSD - Security-focused, may need special considerations
  3. NetBSD - Highly portable, good test of platform abstraction

Technical considerations

  • Most use same ABIs as Linux (sysv_amd64, arm64, etc.)
  • Main differences: object format details, system headers
  • May need adjustments to Makefile and CI workflows
  • OpenBSD has W^X restrictions that may affect stack switching

Implementation approach

  • Start with FreeBSD (largest user base)
  • Likely can reuse existing switch_*_gcc.S files
  • Add platform detection in platforms/platform.h
  • CI: GitHub Actions has FreeBSD support via vmactions/freebsd-vm

Priority

Medium - These platforms have active user communities but smaller than Linux/macOS/Windows.

Referenced in conversation about future platform additions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions