From 9bb201407cc61558da4418c28603fbbf8a7be261 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 13 Oct 2022 17:34:37 +0800 Subject: [PATCH] python@3.10: skip LTO on Linux Fixes Homebrew/discussions#3734. This is essentially the same issue as #112154, except that I'm not aware of a way to convert the bitcode for GCC. It's possible that there is no way to do this, given that GCC seems to consider its IR as an internal implementation detail. Closes #113036. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/python@3.10.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Formula/python@3.10.rb b/Formula/python@3.10.rb index 0eba0276ace572..c1311fea02ac15 100644 --- a/Formula/python@3.10.rb +++ b/Formula/python@3.10.rb @@ -142,13 +142,16 @@ def install --with-openssl=#{Formula["openssl@1.1"].opt_prefix} --with-dbmliborder=gdbm:ndbm --enable-optimizations - --with-lto --with-system-expat --with-system-ffi --with-system-libmpdec ] if OS.mac? + # Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC + # install does not match the one in CI _exactly_ (major and minor version). + # https://github.com/orgs/Homebrew/discussions/3734 + args << "--with-lto" args << "--enable-framework=#{frameworks}" args << "--with-dtrace" else