Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909196 - dev-lang/python[lto] compiles in single thread, ignores -flto cflags with -flto-partition=one
Summary: dev-lang/python[lto] compiles in single thread, ignores -flto cflags with -fl...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2023-06-26 16:03 UTC by om3i
Modified: 2024-11-09 15:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-16 06:30:10 UTC
Eli and I have discussed this a few times in -python, really, there's on reason for it to be passing -flto-partition=none. It's been there since the LTO configure arg was added upstream...