Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 641952 Details for
Bug 615412
dev-lang/python: add pgo support
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
pgo-lto patches
pgo+lto-3.7-3.8-3.9.patch (text/plain), 7.75 KB, created by
Joel Berendzen
on 2020-05-26 18:37:46 UTC
(
hide
)
Description:
pgo-lto patches
Filename:
MIME Type:
Creator:
Joel Berendzen
Created:
2020-05-26 18:37:46 UTC
Size:
7.75 KB
patch
obsolete
>diff --git a/metadata.xml b/metadata.xml >index 98fa548..6f87742 100644 >--- a/metadata.xml >+++ b/metadata.xml >@@ -7,6 +7,8 @@ > </maintainer> > <use> > <flag name="bluetooth">Build Bluetooth protocol support in socket module</flag> >+ <flag name="lto">Build with link-time optimizations.</flag> >+ <flag name="pgo">Add support for profile-guided optimizations.</flag> > <flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> > <flag name="wide-unicode">Enable wide Unicode implementation which uses 4-byte Unicode characters. Switching of this USE flag changes ABI of Python and requires reinstallation of many Python modules. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag> > <flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag> >diff --git a/python-3.7.7-r2.ebuild b/python-3.7.7-r2.ebuild >index ce301b6..4cafd17 100644 >--- a/python-3.7.7-r2.ebuild >+++ b/python-3.7.7-r2.ebuild >@@ -19,7 +19,7 @@ S="${WORKDIR}/${MY_P}" > LICENSE="PSF-2" > SLOT="${PYVER}/${PYVER}m" > KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86" >-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" >+IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml" > RESTRICT="!test? ( test )" > > # Do not add a dependency on dev-lang/python to this ebuild. >@@ -144,7 +144,11 @@ src_configure() { > --without-ensurepip > --with-system-expat > --with-system-ffi >+ $(use_wth lto) > ) >+ if use pgo; then >+ myeconfarg+=("--enable-optimizations") >+ fi > > OPT="" econf "${myeconfargs[@]}" > } >@@ -154,7 +158,11 @@ src_compile() { > # https://bugs.gentoo.org/594768 > local -x LC_ALL=C > >- emake CPPFLAGS= CFLAGS= LDFLAGS= >+ if use pgo; then >+ emake profile-opt PROFILE_TASK="-m test.regrtest --pgo -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 test___all__ test_argparse test_asyncore test_contextlib_async test_devpoll test_httplib test_kqueue test_msilib test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_nis test_nntplib test_normalization test_ntpath test_os test_ossaudiodev test_robotparser test_shutil test_site test_smtpnet test_socket test_ssl test_startfile test_timeout test_tix test_tk test_tools test_ttk_guionly test_ttk_textonly test_urllib2 test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_zipfile64 test_zipimport" >+ 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 >diff --git a/python-3.8.3.ebuild b/python-3.8.3.ebuild >index c1cb51a..3d57cf3 100644 >--- a/python-3.8.3.ebuild >+++ b/python-3.8.3.ebuild >@@ -19,7 +19,7 @@ S="${WORKDIR}/${MY_P}" > LICENSE="PSF-2" > SLOT="${PYVER}" > KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" >-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" >+IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml" > RESTRICT="!test? ( test )" > > # Do not add a dependency on dev-lang/python to this ebuild. >@@ -111,11 +111,6 @@ src_configure() { > use hardened && replace-flags -O3 -O2 > fi > >- # https://bugs.gentoo.org/700012 >- if is-flagq -flto || is-flagq '-flto=*'; then >- append-cflags $(test-flags-CC -ffat-lto-objects) >- fi >- > # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. > tc-export CXX > >@@ -149,8 +144,11 @@ src_configure() { > --without-ensurepip > --with-system-expat > --with-system-ffi >+ $(use_with lto) > ) >- >+ if use pgo; then >+ myeconfarg+=("enable-optimizations") >+ fi > OPT="" econf "${myeconfargs[@]}" > } > >@@ -159,8 +157,11 @@ src_compile() { > # https://bugs.gentoo.org/594768 > local -x LC_ALL=C > >- emake CPPFLAGS= CFLAGS= LDFLAGS= >- >+ if use pgo; then >+ emake profile-opt PROFILE_TASK="-m test.regrtest --pgo -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 test___all__ test_argparse test_asyncore test_contextlib_async test_devpoll test_httplib test_kqueue test_msilib test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_nis test_nntplib test_normalization test_ntpath test_os test_ossaudiodev test_robotparser test_shutil test_site test_smtpnet test_socket test_ssl test_startfile test_timeout test_tix test_tk test_tools test_ttk_guionly test_ttk_textonly test_urllib2 test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_zipfile64 test_zipimport" >+ 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 > pax-mark E python >diff --git a/python-3.9.0_beta1.ebuild b/python-3.9.0_beta1.ebuild >index b1c8280..ec1f6c9 100644 >--- a/python-3.9.0_beta1.ebuild >+++ b/python-3.9.0_beta1.ebuild >@@ -20,7 +20,7 @@ S="${WORKDIR}/${MY_P}" > LICENSE="PSF-2" > SLOT="${PYVER}" > KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" >-IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml" >+IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml" > RESTRICT="!test? ( test )" > > # Do not add a dependency on dev-lang/python to this ebuild. >@@ -123,11 +123,6 @@ src_configure() { > use hardened && replace-flags -O3 -O2 > fi > >- # https://bugs.gentoo.org/700012 >- if is-flagq -flto || is-flagq '-flto=*'; then >- append-cflags $(test-flags-CC -ffat-lto-objects) >- fi >- > # Export CXX so it ends up in /usr/lib/python3.X/config/Makefile. > tc-export CXX > >@@ -161,7 +156,11 @@ src_configure() { > --without-ensurepip > --with-system-expat > --with-system-ffi >+ $(use_with lto) > ) >+ if use pgo; then >+ myeconfarg+=("--enable-optimizations") >+ fi > > OPT="" econf "${myeconfargs[@]}" > } >@@ -170,9 +169,12 @@ src_compile() { > # Ensure sed works as expected > # https://bugs.gentoo.org/594768 > local -x LC_ALL=C >- >- emake CPPFLAGS= CFLAGS= LDFLAGS= >- >+ >+ if use pgo; then >+ emake profile-opt PROFILE_TASK="-m test.regrtest --pgo -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 test___all__ test_argparse test_asyncore test_contextlib_async test_devpoll test_httplib test_kqueue test_msilib test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_nis test_nntplib test_normalization test_ntpath test_os test_ossaudiodev test_robotparser test_shutil test_site test_smtpnet test_socket test_ssl test_startfile test_timeout test_tix test_tk test_tools test_ttk_guionly test_ttk_textonly test_unicodedata test_urllib2 test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_zipfile64 test_zipimport" >+ 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 > pax-mark E python
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 615412
:
470080
|
501540
|
501696
|
528032
|
528034
|
528036
|
528038
| 641952