Toolchain.eclass has problems with gcc 4.1/4.2 snapshots. When merging files end up in the wrong dirs. For ex. a 4.1.1.20060324 snapshot would install files in both /usr/lib/gcc/i686-pc-linux-gnu/4.1.1 and /usr/lib/gcc/i686-pc-linux-gnu/4.1.1-20060324 when it should only be in the later and in /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1 when it should be in /usr/libexec/gcc/i686-pc-linux-gnu/4.1.1-20060324. This causes problems when running the compiler: configure:2239: i686-pc-linux-gnu-gcc -O2 -march=pentium3 -pipe -fomit-frame-pointer -D_FORTIFY_SOURCE=1 conftest.c >&5 /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status R. Hill described the problem: "This is caused by changes to the build system in 4.1 and GCC's BASE-VER not matching portage's ${PV} in snapshot builds. Most of the system directories are set up by portage during configure using ${PV} as part of the dirname. (eg. includedir=/usr/<lib>/gcc/<chost>/${PV}/include). However, libdir and libexecdir aren't set by portage (because they generate really strange paths w/ --enable-version-specific-runtime-libs in GCC 3.3/3.4) and default to /usr/<lib>/gcc/<chost>/BASE-VER/blah. When ${PV} != BASE-VER, wackiness ensues. Try this in your ebuild: src_unpack() { toolchain_src_unpack echo ${PV/_/-} > "${S}"/gcc/BASE-VER echo "" > "${S}"/gcc/DATESTAMP } --de." Unfortunately adding those lines makes the compiler ICE (gcc bug #19372).
I'll get to this when I make the changes necessary for gcc-4.2 to the eclass, which will hopefully be in a few days.
strange, i use it my svn ebuild and haven't ever run into trouble. maybe you're using a $PV GCC doesn't like. how do you name your ebuild? mine is currently gcc-4.1.0_pre20060324.
correct, if you name your ebuild #.#.#.#######, that is wrong it should be #.#.#_pre######
I used 4.1.1.20060314 and 4.1.1_beta20060324 and both failed. I'll try with _pre.
Yes that seems to have fixed it. Though I had to pull gcc from svn and make my own snapshot tarball instead of using one fron gcc.gnu.org.
Added the necessary changes to the eclass.