Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 909196

Summary: dev-lang/python[lto] compiles in single thread, ignores -flto cflags
Product: Gentoo Linux Reporter: om3i <r9ku1q>
Component: Current packagesAssignee: Python Gentoo Team <python>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description om3i 2023-06-26 16:03:54 UTC
To be more specific, the linker plugin only performs half of the compilation in a single thread. This is because configure.ac overrides the user-specified flags:
-flto=12 -flto-compression-level=0
with these flags:
LTOFLAGS="-flto ... -flto-partition=none"
I understand that single-threaded lto may produce better optimization, but I don't think it's worth the trade-off.

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-26 16:13:32 UTC
This is more nuanced than it appears, in that the reason we do USE=lto for the configure argument is because for years, the configure test was broken.

This has finally been fixed in autoconf-archive via https://github.com/autoconf-archive/autoconf-archive/pull/279, but it's not yet in a release.