gcc-config leaves traces of gcc installation inside /etc/clang even when gcc and gcc-config are removed from the system.
The main culprit is /etc/clang/gentoo-gcc-install.cfg, which is included from /etc/clang/gentoo-common.cfg.
Steps to Reproduce:
1. Have a llvm profile enabled
2. run: emerge --oneshot gcc
3. run: emerge --depclean
4. Try emerge any package which needs c and/or c++ code compiling
Portage can't use any compiler. Tries to run clang, but clang complains about missing gcc installation
A Working Portage which can compile c and c++ -based software.
We had some conversation already at forums. Please see the URL.
I don't see this as a very critical bug as one can either clean /etc/clang from gcc-config leftovers or just refraing from using (emerging) gcc in llvm based system.
A quickest fix would be to add package.mask for gcc and gcc-config in llvm profiles.
I accidentaly stumbled upon this because refind doesn't compile using clang at the moment. So masking gcc and gcc-config could potentially also block some other packages on llvm profiles.
1. gcc becomes depcleanable
2. gcc (and then gcc-config) are unmerged
3. /etc/clang/gentoo-gcc-install.cfg's --gcc-install-dir points to a now-non-existent path
We should either clean it up in toolchain.eclass in pre/postrm or in pre/postrm in gcc-config.
(prerm sounds better because we narrow the race then.)
gcc-config might be able to do it by itself as well.
Also this gets printed when doing 'emerge --info'
!!! No gcc found. You probably need to 'source /etc/profile'
!!! to update the environment of this terminal and possibly
!!! other terminals also.
I'm not sure if this happens because gcc-config did leave something else hanging under /etc or if portage/emerge always expects gcc to be founf from the system even when using llvm based profile.