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

Diego Biurrun diego at biurrun.de
Sat Aug 25 01:55:33 CEST 2007


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.

Diego



More information about the MPlayer-dev-eng mailing list