From d5965022f2ecfa26149ae18e28e5b546c4f004df Mon Sep 17 00:00:00 2001 From: Rob <86313040+robert-manchester@users.noreply.github.com> Date: Sun, 29 Oct 2023 11:24:01 -0700 Subject: [PATCH] python311Packages.nuitka: default to lto off for darwin --- .../python-modules/nuitka/darwin-lto.patch | 15 +++++++++++++++ .../development/python-modules/nuitka/default.nix | 6 +++--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 pkgs/development/python-modules/nuitka/darwin-lto.patch diff --git a/pkgs/development/python-modules/nuitka/darwin-lto.patch b/pkgs/development/python-modules/nuitka/darwin-lto.patch new file mode 100644 index 000000000000..bd3a65905498 --- /dev/null +++ b/pkgs/development/python-modules/nuitka/darwin-lto.patch @@ -0,0 +1,15 @@ +diff --git a/nuitka/build/SconsCompilerSettings.py b/nuitka/build/SconsCompilerSettings.py +index 319b72c4e..89d40f2a2 100644 +--- a/nuitka/build/SconsCompilerSettings.py ++++ b/nuitka/build/SconsCompilerSettings.py +@@ -173,8 +173,8 @@ def _enableLtoSettings( + lto_mode = False + reason = "known to be not supported (CondaCC)" + elif isMacOS() and env.gcc_mode and env.clang_mode: +- lto_mode = True +- reason = "known to be supported (macOS clang)" ++ lto_mode = False ++ reason = "known to not be supported (macOS nix clang)" + elif env.mingw_mode and env.clang_mode: + lto_mode = False + reason = "known to not be supported (new MinGW64 Clang)" diff --git a/pkgs/development/python-modules/nuitka/default.nix b/pkgs/development/python-modules/nuitka/default.nix index f10cbb749304..fee04a0e40f4 100644 --- a/pkgs/development/python-modules/nuitka/default.nix +++ b/pkgs/development/python-modules/nuitka/default.nix @@ -1,5 +1,4 @@ { lib -, stdenv , buildPythonPackage , ccache , fetchFromGitHub @@ -22,6 +21,9 @@ buildPythonPackage rec { hash = "sha256-spa3V9KEjqmwnHSuxLLIu9hJk5PrRwNyOw72sfxBVKo="; }; + # default lto off for darwin + patches = [ ./darwin-lto.patch ]; + nativeBuildInputs = [ setuptools ]; nativeCheckInputs = [ ccache ]; @@ -44,8 +46,6 @@ buildPythonPackage rec { disabled = isPyPy; meta = with lib; { - # tests fail with linker errors on darwin - broken = stdenv.isDarwin; description = "Python compiler with full language support and CPython compatibility"; license = licenses.asl20; homepage = "https://nuitka.net/";