1 |
On Fri, 8 Sep 2017 10:33:11 +0200 |
2 |
Michał Górny <mgorny@g.o> wrote: |
3 |
|
4 |
> Make tc-getBUILD* functions respect host variables (CC & co.) when |
5 |
> not cross-compiling. This removes the necessity of overriding BUILD_* |
6 |
> along with the regular variables on the systems that are not concerned |
7 |
> about cross-compilation, and does not change the behavior for those |
8 |
> which are. |
9 |
> |
10 |
> Closes: https://bugs.gentoo.org/630282 |
11 |
> --- |
12 |
> eclass/toolchain-funcs.eclass | 8 +++++++- |
13 |
> 1 file changed, 7 insertions(+), 1 deletion(-) |
14 |
> |
15 |
> diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
16 |
> index aeb6f7c70299..75fa638efff3 100644 |
17 |
> --- a/eclass/toolchain-funcs.eclass |
18 |
> +++ b/eclass/toolchain-funcs.eclass |
19 |
> @@ -40,7 +40,13 @@ _tc-getPROG() { |
20 |
> export ${var}="${prog[*]}" |
21 |
> echo "${!var}" |
22 |
> } |
23 |
> -tc-getBUILD_PROG() { _tc-getPROG CBUILD "BUILD_$1 $1_FOR_BUILD HOST$1" "${@:2}"; } |
24 |
> +tc-getBUILD_PROG() { |
25 |
> + local vars="BUILD_$1 $1_FOR_BUILD HOST$1" |
26 |
> + # respect host vars if not cross-compiling |
27 |
> + # https://bugs.gentoo.org/630282 |
28 |
> + tc-is-cross-compiler || vars+=" $1" |
29 |
> + _tc-getPROG CBUILD "${vars}" "${@:2}" |
30 |
> +} |
31 |
> tc-getPROG() { _tc-getPROG CHOST "$@"; } |
32 |
> |
33 |
> # @FUNCTION: tc-getAR |
34 |
> -- |
35 |
> 2.14.1 |
36 |
> |
37 |
|
38 |
Looks good. Worth adding actual ebuild name that failed for you. |
39 |
|
40 |
|
41 |
-- |
42 |
|
43 |
Sergei |