Skip to content

Comments

Support cross compiling to BSD and CI it (backport #8887)#12770

Closed
mergify[bot] wants to merge 6 commits into2.18-maintenancefrom
mergify/bp/2.18-maintenance/pr-8887
Closed

Support cross compiling to BSD and CI it (backport #8887)#12770
mergify[bot] wants to merge 6 commits into2.18-maintenancefrom
mergify/bp/2.18-maintenance/pr-8887

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Mar 28, 2025

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

  • agreed on idea
  • agreed on implementation strategy
  • tests, as appropriate
    • functional tests - tests/**.sh
    • unit tests - src/*/tests
    • integration tests - tests/nixos/*
  • documentation in the manual
  • documentation in the internal API docs
  • code and comments are self-explanatory
  • commit message explains why the change was made
  • new feature or incompatible change: updated release notes

Priorities

Add 👍 to pull requests you find important.


This is an automatic backport of pull request #8887 done by [Mergify](https://mergify.com).

(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)
@mergify mergify bot added the automatic backport This PR is a backport produced by automation (does not trigger backporting) label Mar 28, 2025
@mergify mergify bot requested a review from edolstra as a code owner March 28, 2025 03:45
@mergify
Copy link
Contributor Author

mergify bot commented Mar 28, 2025

Cherry-pick of e44d2a6 has failed:

On branch mergify/bp/2.18-maintenance/pr-8887
Your branch is up to date with 'origin/2.18-maintenance'.

You are currently cherry-picking commit e44d2a6bb.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   flake.nix

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 564392b has failed:

On branch mergify/bp/2.18-maintenance/pr-8887
Your branch is ahead of 'origin/2.18-maintenance' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 564392b57.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   flake.nix

no changes added to commit (use "git add" and/or "git commit -a")

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

@Ericson2314
Copy link
Member

We have in later versions, and that's good enough.

@xokdvium xokdvium deleted the mergify/bp/2.18-maintenance/pr-8887 branch October 7, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automatic backport This PR is a backport produced by automation (does not trigger backporting) conflicts merge-queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant