Support cross compiling to BSD and CI it (backport #8887)#12770
Closed
mergify[bot] wants to merge 6 commits into2.18-maintenancefrom
Closed
Support cross compiling to BSD and CI it (backport #8887)#12770mergify[bot] wants to merge 6 commits into2.18-maintenancefrom
mergify[bot] wants to merge 6 commits into2.18-maintenancefrom
Conversation
(cherry picked from commit e44d2a6) # Conflicts: # flake.nix
Need to get tools from right package set. Could build clang tools but I don't want to wait :D. (cherry picked from commit 28850ee)
The configure script will not tolerate it being missing. (cherry picked from commit 564392b) # Conflicts: # flake.nix
Coppied from the main build; we really should deduplicate this more. (cherry picked from commit 0db251e)
This is a reserved identifier on NetBSD --- it is replaced by a macro on that platform --- and so we cannot use it. (cherry picked from commit 7f76d7f)
Our FreeBSD headers have `pthread_getattr_np`, but we get a link-time error that is missing. The good news is that there is another similar function which does exist, and the upstream project elsewhere does just the [fallback code] we need. As the fallback code indicates, the two functions are not identical however as the other one needs explicit initialization. NetBSD supports both in fact, and its [manpage] is therefore a good resource on what the differences are. [fallback code]: https://github.com/ivmai/bdwgc/blob/07a6d0ee8889bca5eaeadc13cabadc363725d216/os_dep.c#L1266-L1272 [manpage]: https://man.netbsd.org/pthread_attr_get_np.3 (cherry picked from commit c189116)
Contributor
Author
|
Cherry-pick of e44d2a6 has failed: Cherry-pick of 564392b has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Member
|
We have in later versions, and that's good enough. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Fix #3280
Thanks to @alyssais effort, BSD cross compilation in Nixpkgs is now quite mature. Let's take advantage of this with Nix itself --- we've accepted patches to allow BSD builds before, but without CI bitrotting was quite likely. Now it won't bitrot, and people down download pre-built binaries.
Context
depends on #8569
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.shsrc/*/teststests/nixos/*Priorities
Add 👍 to pull requests you find important.
This is an automatic backport of pull request #8887 done by [Mergify](https://mergify.com).