* [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults
@ 2016-06-22 20:06 99% ` Michał Górny
0 siblings, 0 replies; 1+ results
From: Michał Górny @ 2016-06-22 20:06 UTC (permalink / raw
To: gentoo-dev; +Cc: toolchain, Michał Górny
Fix _tc-getPROG function to account correctly for default values that
contain program name along with arguments, e.g. the default for CPP
containing "$(CC) -E".
---
eclass/toolchain-funcs.eclass | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index e794559..7119a46 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -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 $4 ]] && search=$(type -p $4-${prog})
+ [[ -z ${search} && -n ${!tuple} ]] && search=$(type -p ${!tuple}-${prog})
[[ -n ${search} ]] && prog=${search##*/}
- export ${var}=${prog}
+ export ${var}="${prog}"
echo "${!var}"
}
tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; }
--
2.9.0
^ permalink raw reply related [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-06-22 20:06 [gentoo-dev] [PATCH 0/4] toolchain-funcs.eclass: fix for version checks (v2) + compiler identification Michał Górny
2016-06-22 20:06 99% ` [gentoo-dev] [PATCH 1/4] toolchain-funcs.eclass: Fix _tc-getPROG with multi-parameter defaults Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox