In https://bugs.gentoo.org/566282 , the ebuilds for media-video/ffmpeg were amended to support LTO. Unfortunately, they do not respect the -fno-lto flag, particularly if your CFLAGS/CXXFLAGS contain "-flto -fno-lto" -- it will build with "--enable-lto" regardless. A comment on that bug report suggested a fix: https://bugs.gentoo.org/566282#c6 I have tested this fix on my own overlay and it appears to work as intended. I can submit patches to fix the ebuilds using this if desired. Thank you for your time, Shane Peelar
PR created: https://github.com/gentoo/gentoo/pull/5766
commit 4e7e25bb617a8202fb1a0f0381949dcd380de614 Author: David Michael <fedora.dm0@gmail.com> Date: Mon Mar 22 11:06:25 2021 +0100 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@gmail.com> Signed-off-by: David Seifert <soap@gentoo.org> And previous context: commit 326cefdf8855ccef084426e4581ebae1af4989e2 Author: Alexis Ballier <aballier@gentoo.org> Date: Thu Jan 7 08:32:47 2016 +0100 media-video/ffmpeg: check -flto* for enabling lto, instead of only flto. Bug #566282 by rindeal & Steffen Hau. Package-Manager: portage-2.2.26 Signed-off-by: Alexis Ballier <aballier@gentoo.org> commit caed356beda25dacd829f7988c2b8b1011583111 Author: Alexis Ballier <aballier@gentoo.org> Date: Tue Jan 5 09:26:56 2016 +0100 media-video/ffmpeg: Pass --enable-lto to configure if -flto is in *FLAGS. Fixes build with lto. https://bugs.gentoo.org/show_bug.cgi?id=566282 Package-Manager: portage-2.2.26 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
*** Bug 772887 has been marked as a duplicate of this bug. ***