cc-wrapper, bintools-wrapper: use getHostRoleEnvHook instead of getTargetRoleEnvHook

Fixes include and link paths when cross compiling.
This commit is contained in:
Ben Wolsieffer 2018-06-01 19:42:05 -04:00
parent 507d24a7de
commit 645f03b949
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ set -u
bintoolsWrapper_addLDVars () {
# See ../setup-hooks/role.bash
local role_post role_pre
getTargetRoleEnvHook
getHostRoleEnvHook
if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then
export NIX_${role_pre}LDFLAGS+=" -L$1/lib64"

View File

@ -68,7 +68,7 @@ set -u
ccWrapper_addCVars () {
# See ../setup-hooks/role.bash
local role_post role_pre
getTargetRoleEnvHook
getHostRoleEnvHook
if [[ -d "$1/include" ]]; then
export NIX_${role_pre}CFLAGS_COMPILE+=" ${ccIncludeFlag:--isystem} $1/include"