commit:     4e7e25bb617a8202fb1a0f0381949dcd380de614
Author:     David Michael <fedora.dm0 <AT> gmail <DOT> com>
AuthorDate: Mon Mar 22 10:06:25 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Mar 22 10:06:25 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e7e25bb

media-video/ffmpeg: work around cross-endian tests failing

Cross-compiling with LTO prevents the build system from detecting
endianness.  Upstream says that enabling LTO with CFLAGS is not
supported, so filter -flto* out of CFLAGS after adding --enable-lto
to the configure command (which just adds back -flto after endian
tests pass).

Closes: https://bugs.gentoo.org/754654
Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: David Michael <fedora.dm0 <AT> gmail.com>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 media-video/ffmpeg/ffmpeg-4.3.2.ebuild | 3 ++-
 media-video/ffmpeg/ffmpeg-9999.ebuild  | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/media-video/ffmpeg/ffmpeg-4.3.2.ebuild 
b/media-video/ffmpeg/ffmpeg-4.3.2.ebuild
index 565891baca1..1b5fccb1230 100644
--- a/media-video/ffmpeg/ffmpeg-4.3.2.ebuild
+++ b/media-video/ffmpeg/ffmpeg-4.3.2.ebuild
@@ -424,8 +424,9 @@ multilib_src_configure() {
                break
        done
 
-       # LTO support, bug #566282
+       # LTO support, bug #566282, bug #754654
        is-flagq "-flto*" && myconf+=( "--enable-lto" )
+       filter-flags "-flto*"
 
        # Mandatory configuration
        myconf=(

diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild 
b/media-video/ffmpeg/ffmpeg-9999.ebuild
index 2e4b8b8f43c..8f00858f69a 100644
--- a/media-video/ffmpeg/ffmpeg-9999.ebuild
+++ b/media-video/ffmpeg/ffmpeg-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -422,8 +422,9 @@ multilib_src_configure() {
                break
        done
 
-       # LTO support, bug #566282
+       # LTO support, bug #566282, bug #754654
        is-flagq "-flto*" && myconf+=( "--enable-lto" )
+       filter-flags "-flto*"
 
        # Mandatory configuration
        myconf=(

Reply via email to