Merge pull request #210258 from trofi/gawk-no-pie-on-musl

authored by Sandro and committed by GitHub d0b820fc d9a7ea80

+11 -9
+11 -9
pkgs/tools/text/gawk/default.nix
··· 16 17 assert (doCheck && stdenv.isLinux) -> glibcLocales != null; 18 19 - stdenv.mkDerivation (rec { 20 pname = "gawk" + lib.optionalString interactive "-interactive"; 21 version = "5.2.1"; 22 ··· 31 ./darwin-no-pma.patch 32 ]; 33 34 # When we do build separate interactive version, it makes sense to always include man. 35 outputs = [ "out" "info" ] 36 ++ lib.optional (!interactive) "man"; 37 38 - nativeBuildInputs = lib.optional (doCheck && stdenv.isLinux) glibcLocales 39 - # no-pma fix 40 - ++ [ autoreconfHook ]; 41 42 buildInputs = lib.optional withSigsegv libsigsegv 43 ++ lib.optional interactive readline ··· 83 platforms = platforms.unix ++ platforms.windows; 84 maintainers = [ ]; 85 }; 86 - } // lib.optionalAttrs stdenv.hostPlatform.isMusl { 87 - # PIE is incompatible with the "persistent malloc" ("pma") feature. 88 - # FIXME: make unconditional in staging (added to avoid rebuilds in staging-next) 89 - hardeningDisable = [ "pie" ]; 90 - })
··· 16 17 assert (doCheck && stdenv.isLinux) -> glibcLocales != null; 18 19 + stdenv.mkDerivation rec { 20 pname = "gawk" + lib.optionalString interactive "-interactive"; 21 version = "5.2.1"; 22 ··· 31 ./darwin-no-pma.patch 32 ]; 33 34 + # PIE is incompatible with the "persistent malloc" ("pma") feature. 35 + # While build system attempts to pass -no-pie to gcc. nixpkgs' `ld` 36 + # wrapped still passes `-pie` flag to linker and breaks linkage. 37 + # Let's disable "pie" until `ld` is fixed to do the right thing. 38 + hardeningDisable = [ "pie" ]; 39 + 40 # When we do build separate interactive version, it makes sense to always include man. 41 outputs = [ "out" "info" ] 42 ++ lib.optional (!interactive) "man"; 43 44 + # no-pma fix 45 + nativeBuildInputs = [ autoreconfHook ] 46 + ++ lib.optional (doCheck && stdenv.isLinux) glibcLocales; 47 48 buildInputs = lib.optional withSigsegv libsigsegv 49 ++ lib.optional interactive readline ··· 89 platforms = platforms.unix ++ platforms.windows; 90 maintainers = [ ]; 91 }; 92 + }