From ae147f005a143b438b7f16192985e80c6d8add94 Mon Sep 17 00:00:00 2001 From: Aleksi Hannula Date: Thu, 5 Mar 2026 10:51:56 +0200 Subject: [PATCH] pkgsi686Linux.pkgsMusl.gzip: Fix build Set -no-pie for gzip on this specific platform. The ASM fast-path makes object references without going through PLT, which would need to be relocated. Then musl ldd tries to apply relocations to an R-X .text section and crashes. --- pkgs/tools/compression/gzip/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index 85b452f2260b..446e5fab0af8 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -48,6 +48,10 @@ stdenv.mkDerivation (finalAttrs: { "ZLESS_PROG=zless" ]; + env = lib.optionalAttrs (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isx86_32) { + NIX_CFLAGS_LINK = "-no-pie"; + }; + nativeCheckInputs = [ less perl