summaryrefslogtreecommitdiff
path: root/media-video/ffmpeg/ffmpeg-9999.ebuild
diff options
context:
space:
mode:
Diffstat (limited to 'media-video/ffmpeg/ffmpeg-9999.ebuild')
-rw-r--r--media-video/ffmpeg/ffmpeg-9999.ebuild15
1 files changed, 10 insertions, 5 deletions
diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 867a4147d174..e6491c785ef4 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -414,6 +414,14 @@ src_prepare() {
ln -snf "${FILESDIR}"/chromium.c chromium.c || die
echo 'include $(SRC_PATH)/ffbuild/libffmpeg.mak' >> Makefile || die
+
+ # We need to detect LTO usage before multilib stuff and filter-lto is called (bug #923491)
+ if tc-is-lto ; then
+ # Respect -flto value, e.g -flto=thin
+ local v="$(get-flag flto)"
+ [[ ${v} != -flto ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto"
+ fi
+ filter-lto
}
multilib_src_configure() {
@@ -505,12 +513,9 @@ multilib_src_configure() {
done
# LTO support, bug #566282, bug #754654, bug #772854
- if [[ ${ABI} != x86 ]] && tc-is-lto; then
- # Respect -flto value, e.g -flto=thin
- local v="$(get-flag flto)"
- [[ -n ${v} ]] && myconf+=( "--enable-lto=${v}" ) || myconf+=( "--enable-lto" )
+ if [[ ${ABI} != x86 && ! -z ${LTO_FLAG} ]]; then
+ myconf+=( ${LTO_FLAG} )
fi
- filter-lto
# Mandatory configuration
myconf=(