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