diff options
author | Tristan Helmich <tristan.helmich@gmail.com> | 2016-03-10 15:47:55 +0100 |
---|---|---|
committer | Tristan Helmich <tristan.helmich@gmail.com> | 2016-03-10 15:47:55 +0100 |
commit | 7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa (patch) | |
tree | 9e6c3bfaf1a52f59189b81c1ec4dc57e8b3369b3 /pkgs/build-support/cc-wrapper | |
parent | 514a478e614f0ac439f84f72e2f9814f2bc1d01f (diff) | |
download | nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar.gz nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar.bz2 nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar.lz nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar.xz nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.tar.zst nixlib-7e2e0dfe7a4f9977ae0b6d74c821f8ffe7739efa.zip |
cc-wrapper: Use stderr for NIX_DEBUG output
Otherwise configure scripts might break when looking for the path to ld
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r-- | pkgs/build-support/cc-wrapper/add-hardening | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/build-support/cc-wrapper/add-hardening b/pkgs/build-support/cc-wrapper/add-hardening index 82477c6b7d9d..cd7718801efd 100644 --- a/pkgs/build-support/cc-wrapper/add-hardening +++ b/pkgs/build-support/cc-wrapper/add-hardening @@ -14,43 +14,43 @@ if [[ ! $hardeningDisable == "all" ]]; then if [[ ! "${hardeningDisable[@]}" =~ "$flag" ]]; then case $flag in fortify) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling fortify; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling fortify >&2; fi hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2') ;; stackprotector) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling stackprotector; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling stackprotector >&2; fi hardeningCFlags+=('-fstack-protector-strong' '--param ssp-buffer-size=4') ;; pie) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling CFlags -fPIE; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling CFlags -fPIE >&2; fi hardeningCFlags+=('-fPIE') if [[ ! ("$*" =~ " -shared " || "$*" =~ " -static ") ]]; then - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling LDFlags -pie; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling LDFlags -pie >&2; fi hardeningLDFlags+=('-pie') fi ;; pic) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling pic; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling pic >&2; fi hardeningCFlags+=('-fPIC') ;; strictoverflow) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling strictoverflow; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling strictoverflow >&2; fi hardeningCFlags+=('-fno-strict-overflow') ;; format) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling format; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling format >&2; fi hardeningCFlags+=('-Wformat' '-Wformat-security' '-Werror=format-security') ;; relro) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling relro; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling relro >&2; fi hardeningLDFlags+=('-z relro') ;; bindnow) - if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling bindnow; fi + if [[ -n "$NIX_DEBUG" ]]; then echo HARDENING: enabling bindnow >&2; fi hardeningLDFlags+=('-z now') ;; *) - echo "Hardening flag unknown: $flag" + echo "Hardening flag unknown: $flag" >&2 ;; esac fi |