python3: Enable FreeBSD cross build

This only enables x86_64-unknown-freebsd, not any other FreeBSD, since I
do not have any other machines to tests on. If you're reading this, feel
free to try out other arches!
This commit is contained in:
Audrey Dutcher
2024-06-07 20:28:29 -07:00
parent 2542605888
commit 22913c86f1
2 changed files with 28 additions and 1 deletions
@@ -303,10 +303,15 @@ in with passthru; stdenv.mkDerivation (finalAttrs: {
# (since it will do a futile invocation of gcc (!) to find
# libuuid, slowing down program startup a lot).
noldconfigPatch
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform && stdenv.isFreeBSD) [
# Cross compilation only supports a limited number of "known good"
# configurations. If you're reading this and it's been a long time
# since this diff, consider submitting this patch upstream!
./freebsd-cross.patch
] ++ optionals (pythonOlder "3.13") [
# Make sure that the virtualenv activation scripts are
# owner-writable, so venvs can be recreated without permission
# errors.
] ++ optionals (pythonOlder "3.13") [
./virtualenv-permissions.patch
] ++ optionals (pythonAtLeast "3.13") [
./3.13/virtualenv-permissions.patch