Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 615412 | Differences between
and this patch

Collapse All | Expand All

(-)a/metadata.xml (+2 lines)
Lines 7-12 Link Here
7
</maintainer>
7
</maintainer>
8
<use>
8
<use>
9
	<flag name="bluetooth">Build Bluetooth protocol support in socket module</flag>
9
	<flag name="bluetooth">Build Bluetooth protocol support in socket module</flag>
10
	<flag name="lto">Build with link-time optimizations.</flag>
11
	<flag name="pgo">Add support for profile-guided optimizations.</flag>
10
	<flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
12
	<flag name="threads">Enable threading support. (DON'T DISABLE THIS UNLESS YOU KNOW WHAT YOU'RE DOING)</flag>
11
	<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>
13
	<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>
12
	<flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
14
	<flag name="wininst">Install Windows executables required to create an executable installer for MS Windows.</flag>
(-)a/python-3.7.7-r2.ebuild (-2 / +10 lines)
Lines 19-25 S="${WORKDIR}/${MY_P}" Link Here
19
LICENSE="PSF-2"
19
LICENSE="PSF-2"
20
SLOT="${PYVER}/${PYVER}m"
20
SLOT="${PYVER}/${PYVER}m"
21
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
21
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv s390 sparc x86"
22
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
22
IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml"
23
RESTRICT="!test? ( test )"
23
RESTRICT="!test? ( test )"
24
24
25
# Do not add a dependency on dev-lang/python to this ebuild.
25
# Do not add a dependency on dev-lang/python to this ebuild.
Lines 144-150 src_configure() { Link Here
144
		--without-ensurepip
144
		--without-ensurepip
145
		--with-system-expat
145
		--with-system-expat
146
		--with-system-ffi
146
		--with-system-ffi
147
		$(use_wth lto)
147
	)
148
	)
149
	if use pgo; then
150
		myeconfarg+=("--enable-optimizations")
151
	fi
148
152
149
	OPT="" econf "${myeconfargs[@]}"
153
	OPT="" econf "${myeconfargs[@]}"
150
}
154
}
Lines 154-160 src_compile() { Link Here
154
	# https://bugs.gentoo.org/594768
158
	# https://bugs.gentoo.org/594768
155
	local -x LC_ALL=C
159
	local -x LC_ALL=C
156
160
157
	emake CPPFLAGS= CFLAGS= LDFLAGS=
161
	if use pgo; then
162
		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"
163
	else
164
		emake CPPFLAGS= CFLAGS= LDFLAGS=
165
	fi
158
166
159
	# Work around bug 329499. See also bug 413751 and 457194.
167
	# Work around bug 329499. See also bug 413751 and 457194.
160
	if has_version dev-libs/libffi[pax_kernel]; then
168
	if has_version dev-libs/libffi[pax_kernel]; then
(-)a/python-3.8.3.ebuild (-9 / +10 lines)
Lines 19-25 S="${WORKDIR}/${MY_P}" Link Here
19
LICENSE="PSF-2"
19
LICENSE="PSF-2"
20
SLOT="${PYVER}"
20
SLOT="${PYVER}"
21
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
21
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
22
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
22
IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml"
23
RESTRICT="!test? ( test )"
23
RESTRICT="!test? ( test )"
24
24
25
# Do not add a dependency on dev-lang/python to this ebuild.
25
# Do not add a dependency on dev-lang/python to this ebuild.
Lines 111-121 src_configure() { Link Here
111
		use hardened && replace-flags -O3 -O2
111
		use hardened && replace-flags -O3 -O2
112
	fi
112
	fi
113
113
114
	# https://bugs.gentoo.org/700012
115
	if is-flagq -flto || is-flagq '-flto=*'; then
116
		append-cflags $(test-flags-CC -ffat-lto-objects)
117
	fi
118
119
	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
114
	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
120
	tc-export CXX
115
	tc-export CXX
121
116
Lines 149-156 src_configure() { Link Here
149
		--without-ensurepip
144
		--without-ensurepip
150
		--with-system-expat
145
		--with-system-expat
151
		--with-system-ffi
146
		--with-system-ffi
147
		$(use_with lto)
152
	)
148
	)
153
149
	if use pgo; then
150
		myeconfarg+=("enable-optimizations")
151
	fi
154
	OPT="" econf "${myeconfargs[@]}"
152
	OPT="" econf "${myeconfargs[@]}"
155
}
153
}
156
154
Lines 159-166 src_compile() { Link Here
159
	# https://bugs.gentoo.org/594768
157
	# https://bugs.gentoo.org/594768
160
	local -x LC_ALL=C
158
	local -x LC_ALL=C
161
159
162
	emake CPPFLAGS= CFLAGS= LDFLAGS=
160
	if use pgo; then
163
161
		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"
162
	else
163
		emake CPPFLAGS= CFLAGS= LDFLAGS=
164
	fi
164
	# Work around bug 329499. See also bug 413751 and 457194.
165
	# Work around bug 329499. See also bug 413751 and 457194.
165
	if has_version dev-libs/libffi[pax_kernel]; then
166
	if has_version dev-libs/libffi[pax_kernel]; then
166
		pax-mark E python
167
		pax-mark E python
(-)a/python-3.9.0_beta1.ebuild (-9 / +11 lines)
Lines 20-26 S="${WORKDIR}/${MY_P}" Link Here
20
LICENSE="PSF-2"
20
LICENSE="PSF-2"
21
SLOT="${PYVER}"
21
SLOT="${PYVER}"
22
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
22
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
23
IUSE="bluetooth build examples gdbm hardened ipv6 libressl +ncurses +readline sqlite +ssl test tk wininst +xml"
23
IUSE="bluetooth build examples gdbm hardened ipv6 libressl lto +ncurses pgo +readline sqlite +ssl test tk wininst +xml"
24
RESTRICT="!test? ( test )"
24
RESTRICT="!test? ( test )"
25
25
26
# Do not add a dependency on dev-lang/python to this ebuild.
26
# Do not add a dependency on dev-lang/python to this ebuild.
Lines 123-133 src_configure() { Link Here
123
		use hardened && replace-flags -O3 -O2
123
		use hardened && replace-flags -O3 -O2
124
	fi
124
	fi
125
125
126
	# https://bugs.gentoo.org/700012
127
	if is-flagq -flto || is-flagq '-flto=*'; then
128
		append-cflags $(test-flags-CC -ffat-lto-objects)
129
	fi
130
131
	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
126
	# Export CXX so it ends up in /usr/lib/python3.X/config/Makefile.
132
	tc-export CXX
127
	tc-export CXX
133
128
Lines 161-167 src_configure() { Link Here
161
		--without-ensurepip
156
		--without-ensurepip
162
		--with-system-expat
157
		--with-system-expat
163
		--with-system-ffi
158
		--with-system-ffi
159
		$(use_with lto)
164
	)
160
	)
161
	if use pgo; then
162
		myeconfarg+=("--enable-optimizations")
163
	fi
165
164
166
	OPT="" econf "${myeconfargs[@]}"
165
	OPT="" econf "${myeconfargs[@]}"
167
}
166
}
Lines 170-178 src_compile() { Link Here
170
	# Ensure sed works as expected
169
	# Ensure sed works as expected
171
	# https://bugs.gentoo.org/594768
170
	# https://bugs.gentoo.org/594768
172
	local -x LC_ALL=C
171
	local -x LC_ALL=C
173
172
	
174
	emake CPPFLAGS= CFLAGS= LDFLAGS=
173
	if use pgo; then
175
174
		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"
175
	else
176
		emake CPPFLAGS= CFLAGS= LDFLAGS=
177
	fi
176
	# Work around bug 329499. See also bug 413751 and 457194.
178
	# Work around bug 329499. See also bug 413751 and 457194.
177
	if has_version dev-libs/libffi[pax_kernel]; then
179
	if has_version dev-libs/libffi[pax_kernel]; then
178
		pax-mark E python
180
		pax-mark E python

Return to bug 615412