-
Notifications
You must be signed in to change notification settings - Fork 113
FreeBSD: Gate GNU-only API #1183
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
base: main
Are you sure you want to change the base?
Conversation
The FreeBSD builds are currently using the GlibC modulemap to import the C runtimes. FreeBSD does not have `gnu_get_libc_version` resulting in build failures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the module was supposed to be named FreeBSD since they don't use Glibc? Ah well.
@swift-ci test |
Yes, we should create a new module and module map for FreeBSD and call it something else, but since everything piggybacks on the Glibc module map, it was convenient to avoid re-writing the |
@@ -136,7 +136,7 @@ func spawnExecutable( | |||
// standardized in POSIX.1-2024 (see https://pubs.opengroup.org/onlinepubs/9799919799/functions/posix_spawn_file_actions_adddup2.html | |||
// and https://www.austingroupbugs.net/view.php?id=411). | |||
_ = posix_spawn_file_actions_adddup2(fileActions, fd, fd) | |||
#if canImport(Glibc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add !OpenBSD while you're add it? SwiftTesting also has a bunch of existing OpenBSD conditionals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've attempted to support OpenBSD but it's entirely untested. It's unclear to me if it would have a module named Glibc (its stdlib is not GNU.)
The FreeBSD builds are currently using the GlibC modulemap to import the C runtimes. FreeBSD does not have
gnu_get_libc_version
resulting in build failures.The use of this API was introduced in #1147