mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
media-video/ffmpeg: disable lto if clang+mold for now
gcc+any or clang+lld/bfd are fine, per bug #947697 comment #7 where rust faces a similar issue, seems to be specific to clang+mold. Do not know what is really to blame here (clang, mold, or ffmpeg's build system for not passing -flto during linking), but would rather do the simplest solution until resolved in whichever. A alternative would be to avoid stripping LDFLAGS if mold but I'd rather to leave lto handling entirely to ffmpeg to be as intended. Feel free to report if this been fixed somewhere (odds are I won't test this myself often), then will drop this after fixed toolchain was at least stabilized or added a ffmpeg backport. Put the logic on its own line for easier removal even if it does the get-flag bit for nothing. Haven't tested if older ffmpeg versions are affected too, but would rather keep this in sync so putting it in every versions (except ffmpeg-4 which hard disables lto anyway). Did test ffmpeg-8 and it did fail with it. Closes: https://bugs.gentoo.org/963835 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -387,6 +387,8 @@ src_prepare() {
|
||||
if tc-is-lto; then
|
||||
: "$(get-flag -flto)" # get -flto=<val> (e.g. =thin)
|
||||
FFMPEG_ENABLE_LTO=--enable-lto${_#-flto}
|
||||
|
||||
tc-ld-is-mold && tc-is-clang && FFMPEG_ENABLE_LTO= #963835
|
||||
fi
|
||||
filter-lto
|
||||
|
||||
|
||||
@@ -398,6 +398,8 @@ src_prepare() {
|
||||
if tc-is-lto; then
|
||||
: "$(get-flag -flto)" # get -flto=<val> (e.g. =thin)
|
||||
FFMPEG_ENABLE_LTO=--enable-lto${_#-flto}
|
||||
|
||||
tc-ld-is-mold && tc-is-clang && FFMPEG_ENABLE_LTO= #963835
|
||||
fi
|
||||
filter-lto
|
||||
}
|
||||
|
||||
@@ -398,6 +398,8 @@ src_prepare() {
|
||||
if tc-is-lto; then
|
||||
: "$(get-flag -flto)" # get -flto=<val> (e.g. =thin)
|
||||
FFMPEG_ENABLE_LTO=--enable-lto${_#-flto}
|
||||
|
||||
tc-ld-is-mold && tc-is-clang && FFMPEG_ENABLE_LTO= #963835
|
||||
fi
|
||||
filter-lto
|
||||
}
|
||||
|
||||
@@ -393,6 +393,8 @@ src_prepare() {
|
||||
if tc-is-lto; then
|
||||
: "$(get-flag -flto)" # get -flto=<val> (e.g. =thin)
|
||||
FFMPEG_ENABLE_LTO=--enable-lto${_#-flto}
|
||||
|
||||
tc-ld-is-mold && tc-is-clang && FFMPEG_ENABLE_LTO= #963835
|
||||
fi
|
||||
filter-lto
|
||||
}
|
||||
|
||||
@@ -392,6 +392,8 @@ src_prepare() {
|
||||
if tc-is-lto; then
|
||||
: "$(get-flag -flto)" # get -flto=<val> (e.g. =thin)
|
||||
FFMPEG_ENABLE_LTO=--enable-lto${_#-flto}
|
||||
|
||||
tc-ld-is-mold && tc-is-clang && FFMPEG_ENABLE_LTO= #963835
|
||||
fi
|
||||
filter-lto
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user