1.system has been emerged multiple gccs 2.gcc-config 2 (i686-pc-linux-gnu-4.2.0) -> generate env.d/05gcc-i686-pc-linux-gnu-4.2.0 3.gcc-config 3 (i686-pc-linux-gnu-4.2.1) -> generate env.d/05gcc-i686-pc-linux-gnu-4.2.1 thus, shell has string-ordered path to gcc after "source /etc/profile". "gcc -v" and "gcc-config -l"report using minimum version of gcc. Reproducible: Always Steps to Reproduce:
post the output of: ls -l /etc/env.d/05* /etc/env.d/gcc/ run `gcc-config -x 2 >& log.2` and `gcc-config -x 3 >& log.3` and post the files as attachments
Created attachment 132920 [details] ls -l /etc/env.d/05* /etc/env.d/gcc/
Created attachment 132924 [details] gcc-config -x 2 >& log.2
Created attachment 132926 [details] gcc-config -x 3 >& log.3
i see that /etc/env.d/gcc/.NATIVE symlink was changed properly.
I can confirm this. In /etc/env.d/gcc/ gcc-config creates config-CTARGET-VERSION files, while it seems as if it previously generated only one config-CTARGET file.
I had the same problem on AMD64. After I emerged gcc-4.2.1, even though `gcc-config x86_64-pc-linux-gnu-4.2.1' completed without error, `gcc-config -l' always pointed to x86_64-pc-linux-gnu-4.2.0. After un-emerging gcc-4.2.0, `gcc-config -l' returned with the error "Active gcc profile is invalid!". I tracked the problem down to the contents of /etc/env.d/gcc/config-x86_64-pc-linux-gnu which still containted "CURRENT=x86_64-pc-linux-gnu-4.2.0" and to the contents of /etc/env.d/05gcc-x86_64-pc-linux-gnu which refered to 4.2.0 rather than 4.2.1. I made config-x86_64-pc-linux-gnu a copy of config-x86_64-pc-linux-gnu-4.2.1 and made 05gcc-x86_64-pc-linux-gnu a copy of 05gcc-x86_64-pc-linux-gnu-4.2.1. Since neither config-x86_64-pc-linux-gnu-4.2.0 nor 05gcc-x86_64-pc-linux-gnu-4.2.0 were now owned by a package, I deleted them. All seems well. `gcc -v' indicates it's gcc-4.2.1 and `gcc-config -l' returns " [1] x86_64-pc-linux-gnu-4.2.1 *". (As Shunichi-san noted in Comment #5, the .NATIVE link was correct and wasn't changed.) Two test compiles completed without error and their programs ran correctly. I am using sys-devel/gcc-config-1.4.0-r3.
fixed with 1.4.0-r4
*** Bug 195490 has been marked as a duplicate of this bug. ***
*** Bug 195727 has been marked as a duplicate of this bug. ***