FreeBSD Bugzilla – Attachment 232057 Details for
Bug 261974
lang/python3*: Enable Link Time Optimization (via autoconf)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v2
python-lto.patch (text/plain), 7.69 KB, created by
Piotr Kubaj
on 2022-02-23 20:34:30 UTC
(
hide
)
Description:
v2
Filename:
MIME Type:
Creator:
Piotr Kubaj
Created:
2022-02-23 20:34:30 UTC
Size:
7.69 KB
patch
obsolete
>diff --git a/lang/python310/Makefile b/lang/python310/Makefile >index 8084d9b8c66a..b4f2013626b4 100644 >--- a/lang/python310/Makefile >+++ b/lang/python310/Makefile >@@ -52,8 +52,10 @@ PLIST_SUB= ABI=${ABIFLAGS} \ > XYZDOT=${DISTVERSION:C/[a-z].*//} \ > OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 > >-OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC >-OPTIONS_DEFAULT= LIBMPDEC PYMALLOC >+OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC LTO NLS PYMALLOC >+OPTIONS_DEFAULT= LIBMPDEC LTO PYMALLOC >+OPTIONS_EXCLUDE_powerpc64= LTO >+OPTIONS_EXCLUDE_riscv64= LTO > OPTIONS_RADIO= HASH > OPTIONS_RADIO_HASH= FNV SIPHASH > OPTIONS_SUB= yes >@@ -75,6 +77,8 @@ IPV6_CONFIGURE_ENABLE= ipv6 > LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec > LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal > >+LTO_CONFIGURE_ON= --with-lto >+ > # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat > # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 > # Upstream Issue: https://bugs.python.org/issue6299 >diff --git a/lang/python310/files/patch-configure b/lang/python310/files/patch-configure >new file mode 100644 >index 000000000000..c78047439605 >--- /dev/null >+++ b/lang/python310/files/patch-configure >@@ -0,0 +1,11 @@ >+--- configure.orig 2022-02-23 19:52:00 UTC >++++ configure >+@@ -6625,7 +6625,7 @@ fi >+ >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ >+ if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. >diff --git a/lang/python311/Makefile b/lang/python311/Makefile >index 676094889cc5..227c16075917 100644 >--- a/lang/python311/Makefile >+++ b/lang/python311/Makefile >@@ -52,8 +52,10 @@ PLIST_SUB= ABI=${ABIFLAGS} \ > XYZDOT=${DISTVERSION:C/[a-z].*//} \ > OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 > >-OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC >-OPTIONS_DEFAULT= LIBMPDEC PYMALLOC >+OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC LTO NLS PYMALLOC >+OPTIONS_DEFAULT= LIBMPDEC LTO PYMALLOC >+OPTIONS_EXCLUDE_powerpc64= LTO >+OPTIONS_EXCLUDE_riscv64= LTO > OPTIONS_RADIO= HASH > OPTIONS_RADIO_HASH= FNV SIPHASH > OPTIONS_SUB= yes >@@ -75,6 +77,8 @@ IPV6_CONFIGURE_ENABLE= ipv6 > LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec > LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal > >+LTO_CONFIGURE_ON= --with-lto=thin >+ > # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat > # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 > # Upstream Issue: https://bugs.python.org/issue6299 >diff --git a/lang/python311/files/patch-configure b/lang/python311/files/patch-configure >new file mode 100644 >index 000000000000..aa89baed8cc0 >--- /dev/null >+++ b/lang/python311/files/patch-configure >@@ -0,0 +1,11 @@ >+--- configure.orig 2022-02-23 19:32:58 UTC >++++ configure >+@@ -7244,7 +7244,7 @@ fi >+ >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ LDFLAGS_NOLTO="-fno-lto" >+ >+ if test -n "$ac_tool_prefix"; then >diff --git a/lang/python37/Makefile b/lang/python37/Makefile >index 43de00c66dd0..55100ad69b12 100644 >--- a/lang/python37/Makefile >+++ b/lang/python37/Makefile >@@ -49,8 +49,10 @@ PLIST_SUB= ABI=${ABIFLAGS} \ > XYZDOT=${DISTVERSION} \ > OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 > >-OPTIONS_DEFINE= DEBUG IPV6 NLS PYMALLOC >-OPTIONS_DEFAULT= PYMALLOC >+OPTIONS_DEFINE= DEBUG IPV6 LTO NLS PYMALLOC >+OPTIONS_DEFAULT= LTO PYMALLOC >+OPTIONS_EXCLUDE_powerpc64= LTO >+OPTIONS_EXCLUDE_riscv64= LTO > OPTIONS_RADIO= HASH > OPTIONS_RADIO_HASH= FNV SIPHASH > OPTIONS_SUB= yes >@@ -68,6 +70,8 @@ SIPHASH_CONFIGURE_ON= --with-hash-algorithm=siphash24 > DEBUG_CONFIGURE_WITH= pydebug > IPV6_CONFIGURE_ENABLE= ipv6 > >+LTO_CONFIGURE_ON= --with-lto >+ > # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat > # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 > # Upstream Issue: https://bugs.python.org/issue6299 >diff --git a/lang/python37/files/patch-configure b/lang/python37/files/patch-configure >new file mode 100644 >index 000000000000..c78047439605 >--- /dev/null >+++ b/lang/python37/files/patch-configure >@@ -0,0 +1,11 @@ >+--- configure.orig 2022-02-23 19:52:00 UTC >++++ configure >+@@ -6625,7 +6625,7 @@ fi >+ >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ >+ if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. >diff --git a/lang/python38/Makefile b/lang/python38/Makefile >index 14fa1346d41c..c95f12a58303 100644 >--- a/lang/python38/Makefile >+++ b/lang/python38/Makefile >@@ -52,8 +52,10 @@ PLIST_SUB= ABI=${ABIFLAGS} \ > XYZDOT=${DISTVERSION} \ > OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 > >-OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC >-OPTIONS_DEFAULT= LIBMPDEC PYMALLOC >+OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC LTO NLS PYMALLOC >+OPTIONS_DEFAULT= LIBMPDEC LTO PYMALLOC >+OPTIONS_EXCLUDE_powerpc64= LTO >+OPTIONS_EXCLUDE_riscv64= LTO > OPTIONS_RADIO= HASH > OPTIONS_RADIO_HASH= FNV SIPHASH > OPTIONS_SUB= yes >@@ -75,6 +77,8 @@ IPV6_CONFIGURE_ENABLE= ipv6 > LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec > LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal > >+LTO_CONFIGURE_ON= --with-lto >+ > # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat > # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 > # Upstream Issue: https://bugs.python.org/issue6299 >diff --git a/lang/python38/files/patch-configure b/lang/python38/files/patch-configure >new file mode 100644 >index 000000000000..c78047439605 >--- /dev/null >+++ b/lang/python38/files/patch-configure >@@ -0,0 +1,11 @@ >+--- configure.orig 2022-02-23 19:52:00 UTC >++++ configure >+@@ -6625,7 +6625,7 @@ fi >+ >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ >+ if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args. >diff --git a/lang/python39/Makefile b/lang/python39/Makefile >index 25a7509e4959..8bcc0f0e8cd6 100644 >--- a/lang/python39/Makefile >+++ b/lang/python39/Makefile >@@ -52,8 +52,10 @@ PLIST_SUB= ABI=${ABIFLAGS} \ > XYZDOT=${DISTVERSION} \ > OSMAJOR=${OSVERSION:C/([0-9]*)[0-9]{5}/\1/} # For plat-freebsd* in pkg-plist. https://bugs.python.org/issue19554 > >-OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC NLS PYMALLOC >-OPTIONS_DEFAULT= LIBMPDEC PYMALLOC >+OPTIONS_DEFINE= DEBUG IPV6 LIBMPDEC LTO NLS PYMALLOC >+OPTIONS_DEFAULT= LIBMPDEC LTO PYMALLOC >+OPTIONS_EXCLUDE_powerpc64= LTO >+OPTIONS_EXCLUDE_riscv64= LTO > OPTIONS_RADIO= HASH > OPTIONS_RADIO_HASH= FNV SIPHASH > OPTIONS_SUB= yes >@@ -75,6 +77,8 @@ IPV6_CONFIGURE_ENABLE= ipv6 > LIBMPDEC_CONFIGURE_ON= --with-system-libmpdec > LIBMPDEC_LIB_DEPENDS= libmpdec.so:math/mpdecimal > >+LTO_CONFIGURE_ON= --with-lto >+ > # Use CPPFLAGS over CFLAGS due to -I ordering, causing elementtree and pyexpat > # to break in Python 2.7, or preprocessor complaints in Python >= 3.3 > # Upstream Issue: https://bugs.python.org/issue6299 >diff --git a/lang/python39/files/patch-configure b/lang/python39/files/patch-configure >new file mode 100644 >index 000000000000..c78047439605 >--- /dev/null >+++ b/lang/python39/files/patch-configure >@@ -0,0 +1,11 @@ >+--- configure.orig 2022-02-23 19:52:00 UTC >++++ configure >+@@ -6625,7 +6625,7 @@ fi >+ >+ if test "$Py_LTO" = 'true' ; then >+ case $CC in >+- *clang*) >++ *clang*|cc) >+ >+ if test -n "$ac_tool_prefix"; then >+ # Extract the first word of "${ac_tool_prefix}llvm-ar", so it can be a program name with args.
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 261974
:
231841
| 232057