[FFmpeg-devel] [PATCH] configure: use -flto=auto if available

Kacper Michajłow kasper93 at gmail.com
Sun Sep 11 19:32:01 EEST 2022


Signed-off-by: Kacper Michajłow <kasper93 at gmail.com>
---
 configure | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 9e51abd0d3..bf5a687239 100755
--- a/configure
+++ b/configure
@@ -7173,8 +7173,9 @@ 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_cflags  -flto
+    check_ldflags -flto=auto || check_ldflags -flto
+    check_ldflags $cpuflags
     disable inline_asm_direct_symbol_refs
 fi
 
-- 
2.37.3



More information about the ffmpeg-devel mailing list