summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Mayer <tobim@fastmail.fm>2022-05-24 18:03:33 +0200
committerTobias Mayer <tobim@fastmail.fm>2022-05-24 18:03:33 +0200
commit1e447d78982c086d88509564d3176291746bc34b (patch)
tree2cd1e2bf48dacc945d58707f781514d1e602301b
parent41cc1d5d9584103be4108c1815c350e07c807036 (diff)
pkgsStatic.python3: fix build
GCC does not come with a `libgcc_eh.a` for the target platform if it was built without `--enable-shared`. That flag was removed with c6dd11ca39ac87899c92b13a743f104c31cadb26, meaning we should no longer attempt to link against that lib.
-rw-r--r--pkgs/development/interpreters/python/cpython/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/cpython/default.nix b/pkgs/development/interpreters/python/cpython/default.nix
index 4463dc8e9ba0..1900296abb7f 100644
--- a/pkgs/development/interpreters/python/cpython/default.nix
+++ b/pkgs/development/interpreters/python/cpython/default.nix
@@ -289,7 +289,7 @@ in with passthru; stdenv.mkDerivation {
CPPFLAGS = concatStringsSep " " (map (p: "-I${getDev p}/include") buildInputs);
LDFLAGS = concatStringsSep " " (map (p: "-L${getLib p}/lib") buildInputs);
LIBS = "${optionalString (!stdenv.isDarwin) "-lcrypt"}";
- NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU ({
+ NIX_LDFLAGS = lib.optionalString (stdenv.cc.isGNU && !stdenv.hostPlatform.isStatic) ({
"glibc" = "-lgcc_s";
"musl" = "-lgcc_eh";
}."${stdenv.hostPlatform.libc}" or "");