--- python-2.7.14-r1.ebuild 2018-04-13 21:38:55.000000000 +0200 +++ python-2.7.14-r2.ebuild 2018-04-19 10:49:41.571264267 +0200 @@ -17,7 +17,7 @@ SRC_URI="https://www.python.org/ftp/pyth LICENSE="PSF-2" SLOT="2.7" KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode wininst +xml" +IUSE="-berkdb build doc elibc_uclibc examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl +threads tk +wide-unicode 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 @@ -215,7 +215,11 @@ src_compile() { touch Include/graminit.h Python/graminit.c cd "${BUILD_DIR}" || die - emake + if use pgo; then + emake profile-opt PROFILE_TASK="-m test.regrtest -w -uall,-audio -x test_gdb test_multiprocessing" + else + emake + fi # Work around bug 329499. See also bug 413751 and 457194. if has_version dev-libs/libffi[pax_kernel]; then