The ebuild will always link the program using g++, no matter what you have specified in your CXX. (i bet this cause problems for cross-compilers as well) Looking at the makefile, it seems that the problem is that LD=g++. Also, the -pthread should be -lpthread.
Created attachment 153057 [details] peercast-0.1218.ebuild attached ebuild fixes the problem. --- peercast-0.1218.ebuild.orig 2008-05-13 14:08:02 +0000 +++ peercast-0.1218.ebuild 2008-05-13 14:08:07 +0000 @@ -30,11 +30,11 @@ } src_compile() { - append-ldflags -pthread + append-ldflags -lpthread cd "${S}"/ui/linux emake CC="$(tc-getCC)" CXX="$(tc-getCXX)" AR="$(tc-getAR)" \ - LDFLAGS="${LDFLAGS}" || die "emake failed" + LDFLAGS="${LDFLAGS}" LD="$(tc-getCXX)" || die "emake failed" } src_install() {
> src_compile() { > - append-ldflags -pthread > + append-ldflags -lpthread This seems wrong to me: linking to a library isn't done by ldflags. Just out of curiosity, what does it serves for vs -pthread ? I though gcc specs were supposed to do the right thing in that case.
(In reply to comment #2) > > src_compile() { > > - append-ldflags -pthread > > + append-ldflags -lpthread > > This seems wrong to me: linking to a library isn't done by ldflags. Just out of > curiosity, what does it serves for vs -pthread ? I though gcc specs were > supposed to do the right thing in that case. > That's what I was thinking as well.. + 08 May 2009; Samuli Suominen <ssuominen@gentoo.org> + peercast-0.1218-r1.ebuild: + Fix hardcoded g++ which was used for linking wrt #221945 So closing..