diff options
author | Sam James <sam@gentoo.org> | 2024-06-04 04:23:30 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-06-04 04:25:05 +0100 |
commit | d9a701f0e4dfecb71ff54d4c8dba1a4494a2f3ea (patch) | |
tree | 354b9e4bb4a5c9338a0673ed343f47e7e51cc019 /media-video/ffmpeg | |
parent | games-simulation/flightgear: add missing xorg build deps (diff) | |
download | gentoo-d9a701f0e4dfecb71ff54d4c8dba1a4494a2f3ea.tar.gz gentoo-d9a701f0e4dfecb71ff54d4c8dba1a4494a2f3ea.tar.bz2 gentoo-d9a701f0e4dfecb71ff54d4c8dba1a4494a2f3ea.zip |
media-video/ffmpeg: fix LTO handling with multilib
Checking ABI and filtering based on that doesn't work in multilib_src_configure
because of contamination & the order the phases / ABIs run in.
Closes: https://bugs.gentoo.org/923491
Thanks-to: Michael Cook <mackal.cook@gmail.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-video/ffmpeg')
-rw-r--r-- | media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild | 15 | ||||
-rw-r--r-- | media-video/ffmpeg/ffmpeg-9999.ebuild | 15 |
2 files changed, 20 insertions, 10 deletions
diff --git a/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild b/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild index 9f5bd8424035..fa3dd7774141 100644 --- a/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild +++ b/media-video/ffmpeg/ffmpeg-6.1.1-r6.ebuild @@ -419,6 +419,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)" + [[ -n ${v} ]] && LTO_FLAG="--enable-lto=${v}" || LTO_FLAG="--enable-lto" + fi + filter-lto } multilib_src_configure() { @@ -510,12 +518,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=( diff --git a/media-video/ffmpeg/ffmpeg-9999.ebuild b/media-video/ffmpeg/ffmpeg-9999.ebuild index 867a4147d174..e4783cb8348f 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)" + [[ -n ${v} ]] && 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=( |