hardening: allow user supplied flags to override

Put hardening flags before user supplied flags.
This commit is contained in:
Charles Strahan 2018-03-05 21:27:00 -05:00
parent cc7ce57f86
commit fc46895e86
No known key found for this signature in database
GPG Key ID: BB47AB4B8489B5A5
2 changed files with 4 additions and 4 deletions

View File

@ -57,8 +57,8 @@ fi
source @out@/nix-support/add-hardening.sh
extraAfter=("${hardeningLDFlags[@]}")
extraBefore=()
extraAfter=()
extraBefore=("${hardeningLDFlags[@]}")
if [ -z "${NIX_@infixSalt@_LDFLAGS_SET:-}" ]; then
extraAfter+=($NIX_@infixSalt@_LDFLAGS)

View File

@ -134,8 +134,8 @@ fi
source @out@/nix-support/add-hardening.sh
# Add the flags for the C compiler proper.
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE "${hardeningCFlags[@]}")
extraBefore=()
extraAfter=($NIX_@infixSalt@_CFLAGS_COMPILE)
extraBefore=("${hardeningCFlags[@]}")
if [ "$dontLink" != 1 ]; then