{bintools,cc}-wrapper: Fix setup hook to respect the role of the cc-compiler

We now have the information to properly determine the role the
cc-wrapper dependency has, by taking advantage of `offset`. No longer
use the soon-to-be-deprecated crossConfig environment variable, the
temp hack used before this change.
This commit is contained in:
John Ericson
2017-12-30 22:04:21 -05:00
parent 7f3ca3e21a
commit a036473a0a
3 changed files with 75 additions and 30 deletions
+11
View File
@@ -326,6 +326,17 @@ declare -ra pkgTargetHookVars=(envTargetTargetHook)
declare -ra pkgHookVarVars=(pkgBuildHookVars pkgHostHookVars pkgTargetHookVars)
# Add env hooks for all sorts of deps with the specified host offset.
addEnvHooks() {
local depHostOffset="$1"
shift
local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"
local pkgHookVar
for pkgHookVar in "${!pkgHookVarsSlice}"; do
eval "${pkgHookVar}s"'+=("$@")'
done
}
# Propagated dep files