Skip to content

Conversation

@kkebo
Copy link

@kkebo kkebo commented Nov 6, 2025

I've added support for FreeBSD. I've only tested this PR on FreeBSD, but I believe it should also work on OpenBSD.

Motivation:

closes #372

Also, Swift on FreeBSD preview toolchain is now available.

Modifications:

  • changed pthread-related code for *BSD
  • changed Glibc.stdout and Glibc.stderr for *BSD because they are non-optional on *BSD

Result:

swift-log and packages depending on it will be usable on FreeBSD.

Checks:

I tested it with swift build and swift test. All tests have passed.

$ swift test
...
Test Suite 'All tests' passed at 2025-11-07 04:29:34.003                                                                                         
         Executed 0 tests, with 0 failures (0 unexpected) in 0.0 (0.0) seconds
...
✔ Test run with 52 tests in 7 suites passed after 0.309 seconds.

Environment:

$ uname -a
FreeBSD Coconut-rhinoceros-beetle 15.0-BETA4 FreeBSD 15.0-BETA4 releng/15.0-n280841-a7707f2a3bf4 GENERIC amd64
$ swift --version
Swift version 6.3-dev (LLVM bff1370bd79c983, Swift 57cf4ce563f700b)
Target: x86_64-unknown-freebsd14.3
Build config: +assertions

Swift toolchain is from https://forums.swift.org/t/swift-on-freebsd-preview/83064.

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.

BSD support

2 participants