Because of bug 116813 I did not have gcc-config or eselect-compiler installed when I went to update gcc to 3.4.5. This resulted in the usual broken system because python could not find libstdc++.so. I think there should be a check in for example toolchain.eclass which makes gcc die in pkg_setup if gcc-config or eselect-compiler is not installed.
sucks