mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
cc-wrapper: Remove redundant hardening
GCC just passes `-z ...` flags to ld unaltered, and they are already passed to LD anyways. On the other hand, `-pie` affects gcc behavior too.
This commit is contained in:
parent
823fb278d3
commit
822a8d0148
@ -43,6 +43,7 @@ if [[ -z "${hardeningDisableMap[all]:-}" ]]; then
|
||||
hardeningCFlags+=('-fPIE')
|
||||
if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then
|
||||
if [[ -n "${NIX_DEBUG:-}" ]]; then echo HARDENING: enabling LDFlags -pie >&2; fi
|
||||
hardeningCFlags+=('-pie')
|
||||
hardeningLDFlags+=('-pie')
|
||||
fi
|
||||
;;
|
||||
|
@ -138,7 +138,7 @@ if [ "$dontLink" != 1 ]; then
|
||||
|
||||
# Add the flags that should only be passed to the compiler when
|
||||
# linking.
|
||||
extraAfter+=($NIX_@infixSalt@_CFLAGS_LINK "${hardeningLDFlags[@]}")
|
||||
extraAfter+=($NIX_@infixSalt@_CFLAGS_LINK)
|
||||
|
||||
# Add the flags that should be passed to the linker (and prevent
|
||||
# `ld-wrapper' from adding NIX_@infixSalt@_LDFLAGS again).
|
||||
|
Loading…
Reference in New Issue
Block a user