diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-01-11 21:18:30 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-01-11 22:18:48 +0000 |
commit | a0bb02d34027368341884a07f3e5ffeee4162fec (patch) | |
tree | cb843745fae6c02826862561631aecf2ce85749d | |
parent | b3d2428df408b0243ed90aca8ab029b5cb5d111e (diff) | |
download | nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar.gz nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar.bz2 nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar.lz nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar.xz nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.tar.zst nixlib-a0bb02d34027368341884a07f3e5ffeee4162fec.zip |
gawk: unconditionally apply the patch to fix PIE linkage on musl
Related: https://github.com/NixOS/nixpkgs/pull/210124
-rw-r--r-- | pkgs/tools/text/gawk/default.nix | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index a85e91b1a0c1..c376411e6f7f 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -16,7 +16,7 @@ assert (doCheck && stdenv.isLinux) -> glibcLocales != null; -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { pname = "gawk" + lib.optionalString interactive "-interactive"; version = "5.2.1"; @@ -31,13 +31,19 @@ stdenv.mkDerivation (rec { ./darwin-no-pma.patch ]; + # PIE is incompatible with the "persistent malloc" ("pma") feature. + # While build system attempts to pass -no-pie to gcc. nixpkgs' `ld` + # wrapped still passes `-pie` flag to linker and breaks linkage. + # Let's disable "pie" until `ld` is fixed to do the right thing. + hardeningDisable = [ "pie" ]; + # When we do build separate interactive version, it makes sense to always include man. outputs = [ "out" "info" ] ++ lib.optional (!interactive) "man"; - nativeBuildInputs = lib.optional (doCheck && stdenv.isLinux) glibcLocales - # no-pma fix - ++ [ autoreconfHook ]; + # no-pma fix + nativeBuildInputs = [ autoreconfHook ] + ++ lib.optional (doCheck && stdenv.isLinux) glibcLocales; buildInputs = lib.optional withSigsegv libsigsegv ++ lib.optional interactive readline @@ -83,8 +89,4 @@ stdenv.mkDerivation (rec { platforms = platforms.unix ++ platforms.windows; maintainers = [ ]; }; -} // lib.optionalAttrs stdenv.hostPlatform.isMusl { - # PIE is incompatible with the "persistent malloc" ("pma") feature. - # FIXME: make unconditional in staging (added to avoid rebuilds in staging-next) - hardeningDisable = [ "pie" ]; -}) +} |