Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building and testing on FreeBSD; Add FreeBSD platform support #8193

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

michael-yuji
Copy link

@michael-yuji michael-yuji commented Jan 1, 2025

Fix building and testing on FreeBSD and add support for "FreeBSD" platform

Motivation:

Adding support for "FreeBSD" is swiftpm is necessary to get a usable toolchain building on FreeBSD.

Modifications:

Archiver

On FreeBSD, the unzip command is available in base but not the zip command. Therefore; we use libarchive (via bsdtar) to produce ZIP archive instead.

The implementation is also based on libarchive which produces different error messages; Tests are updated accordingly

compile / link arguments

FreeBSD ships with libc++ by default hence should use -lc++. Like Linux, defsym is also required to link targets with _main symbol.

FreeBSD native package manager (pkgng) support:

FreeBSD uses pkgng as its package manager,

Result:

Should be able to build swiftpm on FreeBSD. Testing on x86_64 FreeBSD 14.2 RELEASE

@MaxDesiatov
Copy link
Contributor

@swift-ci test

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.

2 participants