diff options
author | Piotr Kubaj <pkubaj@FreeBSD.org> | 2022-03-09 17:30:00 +0000 |
---|---|---|
committer | Piotr Kubaj <pkubaj@FreeBSD.org> | 2022-03-09 17:30:00 +0000 |
commit | 9a31e1b6d3bff1eef9fcd5e72268c238ec5335fb (patch) | |
tree | 22a2dcb9b5df13d56aa577b4d9cb41a9e877f67e /lang/python39 | |
parent | net-p2p/py-tremc: Update to 0.9.3 (diff) |
lang/python3*: add LTO option and enable by default everywhere except powerpc64 and riscv64
PR: 261974
Approved by: python (koobs got his commit bit revoked during review process)
Diffstat (limited to 'lang/python39')
-rw-r--r-- | lang/python39/Makefile | 9 | ||||
-rw-r--r-- | lang/python39/files/patch-configure | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/lang/python39/Makefile b/lang/python39/Makefile index 25a7509e4959..8185af11c466 100644 --- a/lang/python39/Makefile +++ b/lang/python39/Makefile @@ -2,6 +2,7 @@ PORTNAME= python DISTVERSION= ${PYTHON_DISTVERSION} +PORTREVISION= 1 CATEGORIES= lang python MASTER_SITES= PYTHON/ftp/python/${DISTVERSION} PKGNAMESUFFIX= ${PYTHON_SUFFIX} @@ -52,8 +53,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 +78,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. |