--- pari-2.5.4.ebuild 2013-05-16 14:18:42.148137162 +1200 +++ pari-2.5.4-r1.ebuild 2013-06-05 21:55:13.452932596 +1200 @@ -74,6 +74,7 @@ src_configure() { tc-export CC + export CPLUSPLUS=$(tc-getCXX) # need to force optimization here, as it breaks without if is-flag -O0; then @@ -102,13 +103,17 @@ mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm fi + if use qt4; then + mycxxmake=LD\=$(tc-getCXX) + fi + local installdir=$(get_compile_dir) cd "${installdir}" || die "failed to change directory" # upstream set -fno-strict-aliasing. # aliasing is a known issue on amd64, work on x86 by sheer luck emake ${mymake} \ CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn - emake ${mymake} \ + emake ${mymake} ${mycxxmake} \ CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp if use doc; then