diff options
Diffstat (limited to 'pkgs/development/libraries/zlib/default.nix')
-rw-r--r-- | pkgs/development/libraries/zlib/default.nix | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 687fb3598444e..23795b6aab40d 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -101,9 +101,16 @@ stdenv.mkDerivation (finalAttrs: { ln -s zlib1.dll $out/bin/libz.dll ''; - # As zlib takes part in the stdenv building, we don't want references - # to the bootstrap-tools libgcc (as uses to happen on arm/mips) - env.NIX_CFLAGS_COMPILE = lib.optionalString (!stdenv.hostPlatform.isDarwin) "-static-libgcc"; + env = lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) { + # As zlib takes part in the stdenv building, we don't want references + # to the bootstrap-tools libgcc (as uses to happen on arm/mips) + NIX_CFLAGS_COMPILE = "-static-libgcc"; + } // lib.optionalAttrs (stdenv.hostPlatform.linker == "lld") { + # lld 16 enables --no-undefined-version by defualt + # This makes configure think it can't build dynamic libraries + # this may be removed when a version is packaged with https://github.com/madler/zlib/issues/960 fixed + NIX_LDFLAGS = "--undefined-version"; + }; # We don't strip on static cross-compilation because of reports that native # stripping corrupted the target library; see commit 12e960f5 for the report. |