aports/community/ffmpeg/flto-auto.patch
Natanael Copa e9fa4208e0 community/ffmpeg: clean up cflags
- Don't modify CFLAGS in global scope
- Patch configure script to use -flto=auto. This significantly speeds up
  linking.
- Use -O2 instead of the default -O3. Size difference for ffmpeg-libs:
  15 MiB -> 12 MiB and no evidence that -O3 makes any significant
  improvement.

My tests with:

  time ffmpeg -i ~/bbb_sunflower_1080p_60fps_normal.mp4 \
    -filter:v scale=720:-1 -c:a copy -f null -

Showed no difference between -O2 and -O3 on an x86_64 i9 machine and
with armv7 it showed a slightly drop of performance with -O3 (which may
be due to other factors as it is a shared machine).
2022-08-29 12:39:27 +02:00

16 lines
437 B
Diff

diff --git a/configure b/configure
index 9d6457d..f57df0d 100755
--- a/configure
+++ b/configure
@@ -7126,8 +7126,8 @@ check_optflags -fno-signed-zeros
if enabled lto; then
test "$cc_type" != "$ld_type" && die "LTO requires same compiler and linker"
- check_cflags -flto
- check_ldflags -flto $cpuflags
+ check_cflags -flto=auto
+ check_ldflags -flto=auto $cpuflags
disable inline_asm_direct_symbol_refs
fi