From db0abe98bfa7adad39912edad44743de030f8300 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Wed, 14 Nov 2018 17:49:24 -0600 Subject: [PATCH] glibc: disable pie hardening, limit to musl for now --- pkgs/development/libraries/glibc/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glibc/default.nix b/pkgs/development/libraries/glibc/default.nix index 8a450959c6b2..27a1267f0cfe 100644 --- a/pkgs/development/libraries/glibc/default.nix +++ b/pkgs/development/libraries/glibc/default.nix @@ -35,7 +35,10 @@ callPackage ./common.nix { inherit stdenv; } { # The stackprotector and fortify hardening flags are autodetected by glibc # and enabled by default if supported. Setting it for every gcc invocation # does not work. - hardeningDisable = [ "stackprotector" "fortify" ]; + hardeningDisable = [ "stackprotector" "fortify" ] + # XXX: Not actually musl-speciic but since only musl enables pie by default, + # limit rebuilds by only disabling pie w/musl + ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie"; # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for # any program we run, because the gcc will have been placed at a new