diff options
-rw-r--r-- | eclass/toolchain-funcs.eclass | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index e794559bbcfb..8ecc73647a46 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -22,7 +22,7 @@ inherit multilib _tc-getPROG() { local tuple=$1 local v var vars=$2 - local prog=$3 + local prog=( $3 ) var=${vars%% *} for v in ${vars} ; do @@ -34,11 +34,11 @@ _tc-getPROG() { done local search= - [[ -n $4 ]] && search=$(type -p "$4-${prog}") - [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p "${!tuple}-${prog}") - [[ -n ${search} ]] && prog=${search##*/} + [[ -n $4 ]] && search=$(type -p $4-${prog[0]}) + [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p ${!tuple}-${prog[0]}) + [[ -n ${search} ]] && prog[0]=${search##*/} - export ${var}=${prog} + export ${var}="${prog[*]}" echo "${!var}" } tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; } |