Installing gcc-4.1.0-beta20050709 using a Gentoo ebuild resulted in an unusable g++ - I think the problem is gcc installer related rather than Gentoo, though.
Gentoo builds gcc with the following configuration: .../gcc-4.1-20050709/configure \ --enable-version-specific-runtime-libs \ --prefix=/usr \ --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.0-beta20050709 \ --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050709/include \ --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050709 \ --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050709/man \ --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.0-beta20050709/info \ --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.0-beta20050709/include/g++-v4 \ --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,c++,f95 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu The problem is that the installation process puts libstdc++ (and all the other built libraries), as well as the fixincludes'd headers, into /usr/lib/gcc/i686-pc-linux-gnu/4.1.0 rather than the locations specified by bindir, datadir, and includedir. Gentoo is (I believe correctly) assuming that the runtime libraries should be in the directories it specified. This appears to be caused by the following: ---[gcc/Makefile.in]--- ... libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version) ... where libsubdir is then used for GCC_INCLUDE_DIR, and a lot of other things. $(version) is set from the contents of the gcc/BASEVER file (containing "4.1.0"). There appears to be no way via configure to get the "expected" behaviour, which is why I suspect it is a gcc issue... Phil -- Summary: 4.1.0-beta20050709: installation does not fully honour configure --*dir completely Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at derived-software dot ltd dot uk CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22499