[MPlayer-dev-eng] [PATCH] configure: use -march=native when available

Zuxy Meng zuxy.meng at gmail.com
Mon Sep 3 05:10:32 CEST 2007


Hi,

2007/8/30, Zuxy Meng <zuxy.meng at gmail.com>:
> Hi,
>
> 2007/8/25, Zuxy Meng <zuxy.meng at gmail.com>:
> > Hi,
> >
> > 2007/8/25, Zuxy Meng <zuxy.meng at gmail.com>:
> > > Hi,
> > >
> > > 2007/8/25, Diego Biurrun <diego at biurrun.de>:
> > > > On Thu, Aug 16, 2007 at 04:04:48PM +0800, Zuxy Meng wrote:
> > > > >
> > > > > gcc 4.2 supports 'native' as an option to 'march' and 'mtune'. And gcc
> > > > > will translate it into the most appropriate march and mtune options
> > > > > for the host machine. It's similar to what mplayer's configure's
> > > > > doing, but refrains us from making the script longer and longer as new
> > > > > CPUs appears in market. What's more, it provides support for CPUs not
> > > > > yet covered by existing -march options (for example, it'll choose
> > > > > -march=prescott -mtune=generic for Yonah).
> > > > >
> > > > > --- configure ?????? 24074??
> > > > > +++ configure ????????????
> > > > > @@ -1700,6 +1700,7 @@
> > > > >       else
> > > > >               proc=pentium4
> > > > >       fi
> > > > > +     test $_fast_cmov = "auto" && _fast_cmov=no
> > > > >       ;;
> > > > >      *) proc=prescott iproc=686 ;;
> > > > >      esac
> > > > > @@ -1843,10 +1845,6 @@
> > > > >
> > > > >      if test $_cmov = "yes" && test $_fast_cmov = "auto" ; then
> > > > >          _fast_cmov="yes"
> > > > > -        case "$proc" in
> > > > > -            pentium4|prescott|nocona)
> > > > > -                _fast_cmov="no"
> > > > > -        esac
> > > > >      else
> > > > >          _fast_cmov="no"
> > > > >      fi
> > > > > @@ -1887,7 +1885,9 @@
> > > > >          *)
> > > > >            # 64-bit prescotts exist, but as far as GCC is concerned they
> > > > >            # have the same capabilities as a nocona.
> > > > > -          proc=nocona;;
> > > > > +          proc=nocona
> > > > > +          test $_fast_cmov = "auto" && _fast_cmov=no
> > > > > +          ;;
> > > > >          esac
> > > > >          ;;
> > > > >        *)
> > > >
> > > > This looks like something else entirely.
> > >
> > > I have to move the _fast_cmov detection code elsewhere or proc=native
> > > will break it.
> >
> > OK I split my diff into two parts: one that adds march=native support,
> > the other resolves the fast_cmov breakage.
>
> No comments? :-)

With no objections I'll apply both next weekend:-)
-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the MPlayer-dev-eng mailing list