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.
Should have been fixed by: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6526608cbdb8202bc69aaaedd19f773ef651862c