binutils-wrapper: Init

Factor a binutils wrapper out of cc-wrapper. While only LD is wrapped,
the setup hook defines environment variables on behalf of other
utilites.
This commit is contained in:
John Ericson
2017-09-01 11:44:55 -04:00
parent fbb7d335db
commit 40e9b2a7e6
12 changed files with 482 additions and 267 deletions
@@ -13,6 +13,12 @@ fi
source @out@/nix-support/utils.sh
# Flirting with a layer violation here.
if [ -z "${NIX_BINUTILS_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
source @binutils@/nix-support/add-flags.sh
fi
# Put this one second so libc ldflags take priority.
if [ -z "${NIX_CC_WRAPPER_@infixSalt@_FLAGS_SET:-}" ]; then
source @out@/nix-support/add-flags.sh
fi