summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2024-06-03 23:52:49 -0400
committerSam James <sam@gentoo.org>2024-06-04 07:53:39 +0100
commit2fbd9aa700613a6070ca84af92b58e253a389e63 (patch)
tree75ff582de6520dce55c54e3d7d3d4c0546197f57 /media-video/ffmpeg/ffmpeg-9999.ebuild
parentdev-util/ruff: add 0.4.7 (diff)
downloadgentoo-2fbd9aa700613a6070ca84af92b58e253a389e63.tar.gz
gentoo-2fbd9aa700613a6070ca84af92b58e253a389e63.tar.bz2
gentoo-2fbd9aa700613a6070ca84af92b58e253a389e63.zip
media-video/ffmpeg: fix another LTO breakage, this time with bare -flto
`get-flag` is a bit of a funny API. It offers to provide the value of a flag, implying, the part after the =. But if there is no = then it simply returns you the whole flag, whereas you might think it returns empty. ffmpeg was relying on it returning empty for the case where no value is passed, but instead we ended up passing --enable-lto=-flto for such a case, which the ffmpeg configure script happily accepts as a valid value, and then silently drops since it doesn't actually work. End result: no LTO for the package with -flto, but working LTO if you used e.g. -flto=4 instead. Explicitly handle the -flto case. Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/ffmpeg/ffmpeg-9999.ebuild')
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index e4783cb8348f..e6491c785ef4 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -419,7 +419,7 @@ src_prepare() {
if tc-is-lto ; then
# Respect -flto value, e.g -flto=thin
local v="$(get-flag flto)"
- [[ -n ${v} ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto"
+ [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto"
fi
filter-lto
}