mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 19:16:11 +00:00
glibc: unconditionally disable pie
glibc already has to be careful not to create extra dynamic relocations in ld.so. For that it enables -fPIC/-fPIE selectively.
This commit is contained in:
parent
bc23b05712
commit
bf990cc3cc
@ -40,13 +40,10 @@ callPackage ./common.nix { inherit stdenv; } {
|
||||
makeFlagsArray+=("bindir=$bin/bin" "sbindir=$bin/sbin" "rootsbindir=$bin/sbin")
|
||||
'';
|
||||
|
||||
# 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" ]
|
||||
# XXX: Not actually musl-speciic but since only musl enables pie by default,
|
||||
# limit rebuilds by only disabling pie w/musl
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "pie";
|
||||
# The pie, 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 = [ "fortify" "pie" "stackprotector" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE = lib.concatStringsSep " "
|
||||
(builtins.concatLists [
|
||||
|
Loading…
Reference in New Issue
Block a user