diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix index 0afdba9983e02..3f48b2c6eb205 100644 --- a/pkgs/development/interpreters/python/cpython/default.nix +++ b/pkgs/development/interpreters/python/cpython/default.nix @@ -288,6 +288,9 @@ in with passthru; stdenv.mkDerivation { ./3.8/0001-On-all-posix-systems-not-just-Darwin-set-LDSHARED-if.patch # Use sysconfigdata to find headers. Fixes cross-compilation of extension modules. ./3.7/fix-finding-headers-when-cross-compiling.patch + ] ++ optionals stdenv.hostPlatform.isLoongArch64 [ + # https://github.com/python/cpython/issues/90656 + ./loongarch-support.patch ]; postPatch = '' diff --git a/pkgs/development/interpreters/python/cpython/loongarch-support.patch b/pkgs/development/interpreters/python/cpython/loongarch-support.patch new file mode 100644 index 0000000000000..44348c5fe32a1 --- /dev/null +++ b/pkgs/development/interpreters/python/cpython/loongarch-support.patch @@ -0,0 +1,50 @@ +diff --git a/configure b/configure +index 8133d47f61..334c98e208 100755 +--- a/configure ++++ b/configure +@@ -6215,6 +6215,20 @@ cat > conftest.c < conftest.c <=6) && defined(_MIPSEL)