--- python-3.5.5.ebuild 2018-04-18 05:08:59.000000000 +0200 +++ python-3.5.5-r1.ebuild 2018-04-19 10:47:14.240755854 +0200 @@ -17,7 +17,7 @@ SRC_URI="https://www.python.org/ftp/pyth LICENSE="PSF-2" SLOT="3.5/3.5m" 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 test +threads tk wininst +xml" +IUSE="build elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test +threads tk wininst +xml pgo" RESTRICT="!test? ( test )" # Do not add a dependency on dev-lang/python to this ebuild. @@ -178,8 +178,11 @@ src_compile() { local -x LC_ALL=C 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_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