diff --git a/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst b/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst new file mode 100644 index 00000000000000..5bf20d2f1d0d22 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2025-04-08-09-11-32.gh-issue-132257.oZWBV-.rst @@ -0,0 +1 @@ +Change the default LTO flags on GCC to not pass ``-flto-partition=none``, and allow parallelization of LTO. For newer GNU makes and GCC, this has a multiple factor speedup for LTO build times, with no noticeable loss in performance. diff --git a/configure b/configure index 1b75ddfa26dcdd..ead65916b7034b 100755 --- a/configure +++ b/configure @@ -8896,7 +8896,7 @@ fi LTOCFLAGS="-flto" ;; *) - LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" + LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" ;; esac ;; diff --git a/configure.ac b/configure.ac index c449bb5ebb3cd4..30b4f512ba611c 100644 --- a/configure.ac +++ b/configure.ac @@ -2031,7 +2031,7 @@ if test "$Py_LTO" = 'true' ; then LTOCFLAGS="-flto" ;; *) - LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none" + LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects" ;; esac ;;