diff mbox series

[FFmpeg-devel,v2] configure: Do not abort when cross-compiling to the native CPU

Message ID 87tv23zw4k.fsf@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,v2] configure: Do not abort when cross-compiling to the native CPU | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

David Michael April 1, 2020, 4:07 a.m. UTC
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>
---

Changes since v1:
  * Use a warning instead of dropping the condition altogether

 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michael Niedermayer April 2, 2020, 9:38 p.m. UTC | #1
On Wed, Apr 01, 2020 at 12:07:55AM -0400, David Michael wrote:
> 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>
> ---
> 
> Changes since v1:
>   * Use a warning instead of dropping the condition altogether
> 
>  configure | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

will apply

thx

[...]
David Michael April 2, 2020, 10:02 p.m. UTC | #2
On Thu, Apr 2, 2020 at 5:38 PM Michael Niedermayer
<michael@niedermayer.cc> wrote:
> On Wed, Apr 01, 2020 at 12:07:55AM -0400, David Michael wrote:
> > 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>
> > ---
> >
> > Changes since v1:
> >   * Use a warning instead of dropping the condition altogether
> >
> >  configure | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
>
> will apply

Thanks!
diff mbox series

Patch

diff --git a/configure b/configure
index 21827eeb45..251b6a977a 100755
--- 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)