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

David Michael fedora.dm0 at gmail.com
Mon Mar 30 17:32:26 EEST 2020


On Sun, Mar 22, 2020 at 11:01 PM David Michael <fedora.dm0 at gmail.com> wrote:
> On Mon, Mar 16, 2020 at 9:16 AM David Michael <fedora.dm0 at gmail.com> wrote:
> > On Sat, Mar 7, 2020 at 10:32 AM David Michael <fedora.dm0 at gmail.com> 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.  Drop the condition that aborts in
> > > this case, since a cross-compiler for an incompatible architecture
> > > will fail with -mtune=native anyway.
> > >
> > > Signed-off-by: David Michael <fedora.dm0 at gmail.com>
> > > ---
> > >
> > > Hi,
> > >
> > > I am building software in a ChromeOS-style environment where the native
> > > build system creates a cross-compiler with a different vendor string for
> > > each supported architecture, and cross-compiled packages are installed
> > > into their own root directory.  The build system's architecture is not
> > > handled any differently, so packages compatible with the native
> > > architecture are still technically being cross-compiled.
> > >
> > > When I changed settings to tune for the native CPU so I can produce an
> > > installation optimized to run on the build system hardware, FFmpeg fails
> > > from this seemingly redundant test.  Can it just be dropped?
> > >
> > > Thanks.
> > >
> > > David
> > >
> > >  configure | 3 ---
> > >  1 file changed, 3 deletions(-)
> > >
> > > diff --git a/configure b/configure
> > > index 06e3a7b2a8..69ffdeb3ed 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -4785,9 +4785,6 @@ if test -n "$sysroot"; then
> > >  fi
> > >
> > >  if test "$cpu" = host; then
> > > -    enabled cross_compile &&
> > > -        die "--cpu=host makes no sense when cross-compiling."
> > > -
> > >      case "$cc_type" in
> > >          gcc|llvm_gcc)
> > >              check_native(){
> > > --
> > > 2.21.1
> >
> > Ping.
>
> Ping.

Ping.


More information about the ffmpeg-devel mailing list