--- python-3.4.8.ebuild 2018-04-18 05:08:59.000000000 +0200 +++ python-3.4.8-r1.ebuild 2018-04-19 10:52:09.951792113 +0200 @@ -17,7 +17,7 @@ SRC_URI="https://www.python.org/ftp/pyth LICENSE="PSF-2" SLOT="3.4/3.4m" KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml" +IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk wininst +xml pgo" # Do not add a dependency on dev-lang/python to this ebuild. # If you need to apply a patch which requires python for bootstrapping, please @@ -179,7 +179,11 @@ src_compile() { cd "${BUILD_DIR}" || die - emake CPPFLAGS= CFLAGS= LDFLAGS= + if use pgo; then + emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing test_subprocess test_tokenize test_signal test_faulthandler test_sundry test_curses test_distutils test_imaplib test_import test_asyncio test_compileall test_pyexpat test_runpy test_support test_threaded_import test_xmlrpc_net" + else + emake CPPFLAGS= CFLAGS= LDFLAGS= + fi # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax_kernel]; then