[MPlayer-dev-eng] [PATCH] configure: enhancement for runtime cpu detection and --target support under x86

Diego Biurrun diego at biurrun.de
Sun Dec 24 01:21:19 CET 2006


On Wed, Dec 13, 2006 at 07:41:24PM +0800, Zuxy Meng wrote:
> 2006/12/13, Diego Biurrun <diego at biurrun.de>:
> >
> >For just one line, no.  If you put 'if' (or similar) around a large
> >number of lines, yes.
> 
> OK. Patch without any cosmetic change included.

The problem is that the patch still mixes several different issues and
is thus hard to review.  I've extracted some parts in modified form, but
not yet committed all of it.  Please try to keep your patches as small
as possible, i.e. one patch per issue.

> --- configure	???????? 21606??
> +++ configure	????????????
> @@ -1052,18 +1062,19 @@
>        _mcpu="$cpuopt=$proc"
>        _optimizing="$proc"
>      fi
> -  else # if test "$_runtime_cpudetection" = no
> +  elif test -z "$_target" ; then # runtime cpu detection
> +    proc="generic"
>      # i686 is probably the most common CPU - optimize for it
>      _mcpu="$cpuopt=i686"
>      # at least i486 required, for bswap instruction
>      _march="-march=i486"
> +    iproc=486

Why?

> @@ -1164,6 +1177,7 @@
>        # x86-64 is an undocumented option, an intersection of k8 and nocona.
>        _march="-march=x86-64"
>        _mcpu="$cpuopt=x86-64"
> +      proc="generic"

Why?

> @@ -2160,6 +2179,7 @@
>    --disable-iwmmxt) _iwmmxt=no ;;
>    --enable-mmx)	_mmx=yes ;;
>    --disable-mmx) # 3Dnow! and MMX2 require MMX
> +        test "$_runtime_cpudetection" = "no" &&
>          _3dnow=no _3dnowext=no _mmx=no _mmxext=no ;;

I'm not sure I like this.  I think the better solution is to exit when
runtime CPU detection is mixed with CPU capability options.

Diego



More information about the MPlayer-dev-eng mailing list