Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603776 - toolchain.eclass: should_we_gcc_config always returns true if CHOST is missing in /etc/portage/make.conf
Summary: toolchain.eclass: should_we_gcc_config always returns true if CHOST is missin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-26 17:38 UTC by Mike Gilbert
Modified: 2019-02-13 23:24 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Gilbert gentoo-dev 2016-12-26 17:38:31 UTC
I noticed that my system gcc version was always being reset when upgrading gcc. 

Adding a set -x statement to the top of should_we_gcc_config reveals a problem:

+ local curr_config
++ env -i ROOT=/ gcc-config -c x86_64-pc-linux-gnu
+ curr_config=' * Python seems to be broken, attempting to locate CHOST ourselves ...
 * gcc-config: Could not get portage CHOST!
 * gcc-config: You should verify that CHOST is set in one of these places:
 * gcc-config:  - //etc/portage/make.conf
 * gcc-config:  - active environment'
+ return 0


The env -i causes CHOST to be unset, which causes gcc-config to fall back on parsing make.conf.

make.conf on my system does not contain a CHOST setting; instead, I rely on the CHOST setting from the amd64 profile.

An easy solution here is to pass CHOST in via the environment. I will send a patch for review shortly.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-02-13 23:24:38 UTC
Should have been fixed by:
    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6526608cbdb8202bc69aaaedd19f773ef651862c