forked from mirrors/nixpkgs
python3: fix NIX_LDFLAGS logic
* Only try to link libgcc if GCC is actually used * Link libgcc depending on libc (glibc vs. musl), rather than Linux/musl vs. Linux/!musl This is a step towards fixing pkgsLLVM.python3.
This commit is contained in:
parent
263bdbdad4
commit
1174f3030c
|
@ -286,7 +286,10 @@ 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"} ${optionalString (ncurses != null) "-lncurses"}";
|
||||
NIX_LDFLAGS = optionalString (stdenv.isLinux && !stdenv.hostPlatform.isMusl) "-lgcc_s" + optionalString stdenv.hostPlatform.isMusl "-lgcc_eh";
|
||||
NIX_LDFLAGS = lib.optionalString stdenv.cc.isGNU ({
|
||||
"glibc" = "-lgcc_s";
|
||||
"musl" = "-lgcc_eh";
|
||||
}."${stdenv.hostPlatform.libc}" or "");
|
||||
# Determinism: We fix the hashes of str, bytes and datetime objects.
|
||||
PYTHONHASHSEED=0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue