Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 630282

Summary: toolchain-funcs.eclass: tc-getBUILD_CC & co should respect CC & co by default
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://archives.gentoo.org/gentoo-dev/message/5c4b6c92a893d03b2f7b584f1b0e555c
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 642762    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-09-07 21:09:32 UTC
Right now, tc-getBUILD_* functions are completely disjoint from tc-get*. This may make sense for cross-compilation environments but the majority of Gentoo systems does not use it, and this simply means they force 'gcc' without any CHOST prefix, which in turn causes horrible distcc mismatches on my network.

I think that the functions should be modified so that:

a. if CBUILD is unset, it default to CHOST,

b. if CBUILD==CHOST, pure CC & co variables are respected.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2017-09-07 21:35:16 UTC
Makes sense.
Comment 2 Mike Gilbert gentoo-dev 2018-01-01 01:17:48 UTC
It doesn't look like your patch has been pushed yet. Anything holding it up?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-01-01 09:21:07 UTC
Just forgot about it. Will merge it now-ish.
Comment 4 Larry the Git Cow gentoo-dev 2018-01-01 10:34:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ea988da8e02e1ba501c73c961147f6ec63c58033

commit ea988da8e02e1ba501c73c961147f6ec63c58033
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-09-08 08:30:29 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2018-01-01 10:34:45 +0000

    toolchain-funcs.eclass: Use host vars in tc-getBUILD* when not cross
    
    Make tc-getBUILD* functions respect host variables (CC & co.) when
    not cross-compiling. This removes the necessity of overriding BUILD_*
    along with the regular variables on the systems that are not concerned
    about cross-compilation, and does not change the behavior for those
    which are.
    
    Closes: https://bugs.gentoo.org/630282

 eclass/toolchain-funcs.eclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)