Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/buildbsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: build and test bsd

on:
push:
branches: [ master, dev ]

pull_request:
branches: [ master ]

# The BSDs use the same sysv_amd64 ABI as Linux, so these jobs build and test
# the existing sources rather than producing an additional library artifact.
# Each job runs in a real VM on the ubuntu-latest runner; GNU make is required
# because the Makefile uses GNU make syntax, while the BSD base system make
# is bmake.

jobs:

build-freebsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: build and test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
cache-after-prepare: true
prepare: |
pkg install -y gmake
run: |
set -ex
gmake all
gmake test

build-openbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: build and test
uses: vmactions/openbsd-vm@v1
with:
usesh: true
cache-after-prepare: true
prepare: |
pkg_add -I gmake
run: |
set -ex
gmake all
gmake test

build-netbsd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- name: build and test
uses: vmactions/netbsd-vm@v1
with:
usesh: true
cache-after-prepare: true
prepare: |
/usr/sbin/pkg_add gmake
run: |
set -ex
gmake all
gmake test
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added
- FreeBSD, OpenBSD and NetBSD (amd64, `sysv_amd64` ABI) are built and tested on every commit by a new `build and test bsd` workflow.

### Fixed
- ABI detection now works on the BSDs: `tools/abiname.sh` used a `mktemp` template with three `X`s, which BSD `mktemp(1)` rejects.

## [1.2.5] - 2026-06-23

### Changed
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![build test and commit](https://github.com/stackless-dev/stackman/actions/workflows/buildcommit.yml/badge.svg)](https://github.com/stackless-dev/stackman/actions/workflows/buildcommit.yml)
[![build and test bsd](https://github.com/stackless-dev/stackman/actions/workflows/buildbsd.yml/badge.svg)](https://github.com/stackless-dev/stackman/actions/workflows/buildbsd.yml)


```
Expand Down Expand Up @@ -101,9 +102,16 @@ calling convention, plus archive format:
- win_x86 (32-bit)
- win_x64 (64-bit)
- win_arm64 (64-bit ARM)
- **FreeBSD, OpenBSD, NetBSD (System V ABI)**
- sysv_amd64 (64-bit x86_64)

All platforms are automatically built and tested by GitHub Actions CI on every commit.

The BSDs share the `sysv_amd64` ABI with Linux and therefore need no separate
assembly implementation or pre-built library; they are built and tested from
source by the `build and test bsd` workflow. Note that the Makefile requires
GNU make, which on the BSDs is `gmake` rather than the base system `make`.

### Supported toolchains:

- Gnu C
Expand Down
3 changes: 2 additions & 1 deletion tools/abiname.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ abi_from_target_triple() {
mkdir -p "${here}/tmp"
# Clean up any stale temp files first
rm -f "${here}/tmp"/abiname*.c "${here}/tmp"/abiname*.c.out
tmp=$(mktemp "${here}/tmp/abinameXXX.c")
# BSD mktemp(1) requires at least six trailing Xs; GNU mktemp accepts them too.
tmp=$(mktemp "${here}/tmp/abinameXXXXXX.c")

#1 create the preprocessed file
CC=${1:-cc}
Expand Down