]> git.sesse.net Git - ffmpeg/commitdiff
configure: Do not abort when cross-compiling to the native CPU
authorDavid Michael <fedora.dm0@gmail.com>
Wed, 1 Apr 2020 04:07:55 +0000 (00:07 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 2 Apr 2020 22:58:07 +0000 (00:58 +0200)
Using a compiler with a different host triplet is considered
cross-compiling, even when it is for the same architecture as the
build system.  With such a cross-compiler, it is still valid to
optimize builds with --cpu=host.  Make the condition that aborts in
this case into a warning instead, since a cross-compiler for an
incompatible architecture will fail with -mtune=native anyway.

Signed-off-by: David Michael <fedora.dm0@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
configure

index 21827eeb45e8806d52cc661d961fc6c472c816d6..251b6a977a72821006f88a9e514832bddb2e48e1 100755 (executable)
--- a/configure
+++ b/configure
@@ -4797,7 +4797,7 @@ fi
 
 if test "$cpu" = host; then
     enabled cross_compile &&
-        die "--cpu=host makes no sense when cross-compiling."
+        warn "--cpu=host makes no sense when cross-compiling."
 
     case "$cc_type" in
         gcc|llvm_gcc)