Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 946880 - dev-perl/Cache-Memcached-Fast filters flto incorrectly resulting in a build failure when LTO is enabled
Summary: dev-perl/Cache-Memcached-Fast filters flto incorrectly resulting in a build f...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: lto
  Show dependency tree
 
Reported: 2024-12-24 14:12 UTC by zurabid2016
Modified: 2024-12-25 01:27 UTC (History)
2 users (show)

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


Attachments
The build.log file (build-noansi.log,8.37 KB, text/x-log)
2024-12-24 14:12 UTC, zurabid2016
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zurabid2016 2024-12-24 14:12:56 UTC
Created attachment 914819 [details]
The build.log file

There is a patch called Cache-Memcached-Fast-0.270.0-no-flto.patch in FILESDIR that attempts to filter flto out. However, it only removes the '-flto' part, which works most of the times except when flto is specified with a number of jobs: '-flto=16'. With the example value '-flto=16', it leaves '=16', which is, obviously, not a valid compiler flag.
Comment 1 zurabid2016 2024-12-24 14:28:23 UTC
By changing the patch's regex to '-flto(=\w*)?\b', the build failure is fixed, but the -flto flag appears here and there. The same effect is observed if filter-lto() function from flag-o-matic.eclass is used
Comment 2 zurabid2016 2024-12-24 14:35:49 UTC
Why does LTO even need to be filtered, by the way? The initial patch seems to have been added in 2017, see commit 3a948a110ad8e44beba6a6ae3edf67b8cca66981 "dev-perl/Cache-Memcached-Fast: Bump to version 0.250.0". For me, Cache-Memcached-Fast builds just fine with LTO
Comment 4 zurabid2016 2024-12-24 14:56:47 UTC
It actually seems as the package adds flto itself
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-12-24 19:31:03 UTC
(In reply to zurabid2016 from comment #4)
> It actually seems as the package adds flto itself

We should strip that out too.